- Unity Visual Studio Code Intellisense
- Unity Intellisense Visual Studio Code
- Unity Visual Studio Intellisense Not Working
- Unity Intellisense Visual Studio Code
- Unity Visual Studio Intellisense
- Visual Studio Code Not Showing Suggestions
Visual Studio brings powerful features to C# programmers. Write code quickly and with precision using IntelliSense. Navigate through your scripts easily and use powerful refactoring capabilities. From Visual Studio, go to Tools → Options. → Tools for Unity → Miscellaneous. Under Show connectivity icon, set it to true then restart Visual Studio. When you re-start, connection icon should now be available in Visual Studio. Click it then choose the Unity instance to connect to.
The end goal here is to have Unity3D and Visual Studio Code installed on a Debian 10 Linux system with Intellisense completionsworking for Unity code.
You should be able to type the start of a Unity name like GameObject
and see the completion:
I mostly followed @nosuchstudio’s guide for Ubuntu 18.04 LTS but added some extra details and confirmed Debian 10 compatability.
There are four things to install and configure:
- Unity Hub
- Visual Studio Code
- .NET Core 3.1
- Mono
1. Install Unity Hub
Download the AppImage from here. Move itto a convenient location and set it executable:
2. Install Visual Studio Code
Download the 64bit deb of Visual Studio Code and install it:
Unity Visual Studio Code Intellisense
Make sure that you have the C# extension installed:
Also make sure that under Unity3D’s Edit/Preferences/External Tools menu, you have Visual Studio Code
selected(not Open by file extension
) and all the checkboxes ticked:

3. Install .NET Core 3.1
Debian 10 can run .NET Core 3.1
(see these notes).
Following the detailed installation steps:
4. Install Mono
Follow the Debian instructions:
Test the integration and Intellisense
Create a new Unity3D project and add a C# script in your Assets folder:
If you have a script attached to a game object, do NOT click the Edit script
menu item as thiswill load the invidivual file. Instead, open the script via the Assets window and selectOpen C# Project
:
Intellisense won’t work until the project has been compiled. You’ll see lots of mono
processes:
Once everything has compiled, test out Intellisense completions:
Also note that the left panel has lots of Unity components, not just the C# file. This indicates that you haveopened the C# project, not an individual file.
-->If your app doesn't need the system keyboard, our recommendation is to use D3D so that your app uses slightly less memory and a faster launch time. However, if you're using the system keyboard through the TouchScreenKeyboard API, you need to export the project as XAML.
How to export from Unity
Unity Intellisense Visual Studio Code
Build settings in Unity editor
- When you're ready to export your project from Unity, open the File menu and select Build Settings...
- Select Add Open Scenes to add your scene to the build.
- In the Build Settings dialog, choose the following options to export for HoloLens:
- Platform:Universal Windows Platform and be sure to select Switch Platform for your selection to take effect.
- SDK:Universal 10.
- UWP Build Type:D3D.
- Optional: Unity C# Projects: Checked.
Note
Checking this box allows you to:
- Debug your app in the Visual Studio remote debugger.
- Edit scripts in the Unity C# project while using IntelliSense for WinRT APIs.
- From the Build Settings... window, open Player Settings...
- Select the Settings for Universal Windows Platform tab.
- Expand the XR Settings group.
- In the XR Settings section, check the Virtual Reality Supported checkbox to add a new Virtual Reality Devices list and confirm 'Windows Mixed Reality' is listed as a supported device.
- Return to the Build Settings dialog.
- Select Build.
- In the Windows Explorer dialog that appears, create a new folder to hold Unity's build output. Generally, we name the folder 'App'.
- Select the newly created folder and select Select Folder.
- Once Unity has finished building, a Windows Explorer window will open to the project root directory. Navigate into the newly created folder.
- Open the generated Visual Studio solution file located inside this folder.
When to re-export from Unity
Checking the C# Projects checkbox when exporting your app from Unity creates a Visual Studio solution that includes all your Unity script files. Having all your scripts in one place lets you iterate without re-exporting from Unity. However, if you make changes to your project that aren't just changing the contents of scripts, you'll need to re-export from Unity. Some examples of times you need to re-export from Unity are:
- You add or remove assets in the Project tab.
- You change any value in the Inspector tab.
- You add or remove objects from the Hierarchy tab.
- You change any Unity project settings
Building and deploying a Unity Visual Studio solution
The remainder of building and deploying apps happens in Visual Studio. You will need to specify a Unity build configuration. Unity's naming conventions may differ from what you're used to in Visual Studio:
Unity Visual Studio Intellisense Not Working
Configuration | Explanation |
---|---|
Debug | All optimizations off and the profiler is enabled. Used to debug scripts. |
Master | All optimizations are turned on and the profiler is disabled. Used to submit apps to the Store. |
Release | All optimizations are turned on and the profiler is enabled. Used to evaluate app performance. |
Unity Intellisense Visual Studio Code
Note, the above list is a subset of the common triggers that will cause the Visual Studio project to need to be generated. In general, editing .cs files from within Visual Studio won't require the project to be regenerated from within Unity.
Unity Visual Studio Intellisense
Troubleshooting
Visual Studio Code Not Showing Suggestions
If you find that edits to your .cs files aren't being recognized in your Visual Studio project, ensure that Unity C# Projects is checked when you generate the VS project from Unity's Build menu.
