简体   繁体   中英

Visual studio not giving Hints (intellisense) when i opening the c# scripts through unity,

I recently installed unity,but I didn't install visual studio with it because I already have installed. I simply opened unity and I goes to Edit > Preferences > External script editor and I selected Visual studio code. But when I opening my scripts, visual studio not giving hints for my c# code.

unity Externals 工具 视觉工作室代码

You probably need to install the appropriate targeting pack for Unity. That article also has some other helpful extensions to install when developing in Unity.

What you could do is just open it and close it.

What i mean by that is go to Assets > Open C# Project

Once VSCode opened, wait for 1 min, try to write something like Rigidbody . If intellisense is working it will start giving you hints, if it's still not working

Do the process one more time,

You can refer to these pictures where how VSCode tells you whether Intellisense is working or not. http://imgur.com/gallery/1YiuPA4

You need to install snippets for Unity in VS code. Open VS code. Go to Extensions(ctrl+shift+X). In search field you need to write unity Then click to Unity Code Snippets and install it in window bellow. Then you will be able to see Intelesence !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM