Home > Software design >  Why doesn't Intellisense work with unity scripts?
Why doesn't Intellisense work with unity scripts?

Time:12-08

When i program scripts for unity via Visual Studio, no code complete appears for unity functions. also, no errors appear when i, say, forget a semicolon or something.

i tried reinstalling the vs unity plugin, no change.

CodePudding user response:

You can try the following steps to solve the problem:

  1. Close visual studio.
  2. Go to Edit < Preferences < External Tools in unity.
  3. Change the External Script Editor like this: enter image description here
  4. Try again in the visual studio.

CodePudding user response:

If code completion isn't working for you in Visual Studio when writing Unity scripts, there are a few possible reasons for this. Here are some steps you can try to troubleshoot and fix the issue:

Check if code completion is enabled in Visual Studio. In Visual Studio, go to "Tools > Options" and then navigate to the "Text Editor > C# > IntelliSense" options page. Make sure that the "Show completion list after a character is typed" option is checked.

Check if the Unity editor plugin for Visual Studio is installed and enabled. In Visual Studio, go to "Tools > Extensions and Updates". In the "Installed" tab, search for "Unity editor". Make sure that the "Unity editor" plugin is installed and enabled.

Make sure that your Unity script files are recognized by Visual Studio as C# files. In Visual Studio, go to "Tools > Options" and then navigate to the "Text Editor > File Extension" options page. In the "Extension" column, search for the file extension of your Unity script files (e.g. ".cs"). Make sure that the "Editor" column for this file extension is set to "C# Editor".

Make sure that your Unity script files are included in the Visual Studio project. In Visual Studio, open your solution and make sure that your Unity script files are included in the project. If they're not, you can add them by right-clicking on the project in the Solution Explorer and selecting "Add > Existing Item".

Try rebuilding your solution. In Visual Studio, go to "Build > Rebuild Solution". This will recompile your project and may help Visual Studio to recognize and provide code completion for your Unity script files.

I hope this helps!

  • Related