- Home /
[Solved]Autocomplete in Visual Studio Won't Work, Please Help!
sooo , i created a new project , and everything was fine until i created the first script, i can't auto compelete , and the name of unity objects and functions (transform,vector3,start function,update function... and all of other types) are not highlighted[as you can see in the screen shot below], everything is fine and working if i load a script from another project.
Did you click "Editor Attaching" in External Tools tab of Preferences?
I see an "Attach to Unity" button in the screener. What does that do?
look my answer (and acept it)
IS this, look at there, you have "miscelanoeus files". this is because de-sync from Unity to Visual studio.
Answer by facejets · Dec 22, 2019 at 02:01 AM
You might have a setting wrong. 'External Script Editor' should be set to a Visual Studio install. It should be located here, in Unity:
Edit > Preferences > External Tools -
Answer by EDevJogos · Jan 07, 2018 at 12:31 AM
Look at the drop box bellow the Spawn.cs, it reads Miscelanious Files, this means that this script is not linked to your unity project, this can happen for many reasons and usually it's solved by just closing and opening the VS again, but my guess is that you already tried that.
Another reason is that for some reason unity is not reconizing the Visual Studio Tools for Unity, if you did not tried yet, you can dowload it and reinstal.
Another option is just select the script in the VS, right click it and select properties, they will then show up in a new box in the right corner, look for the drop box "Build Action" saying "Compile" change it to "None" and than back to "Compile"
There is also this answer on StackOverflow. When this happend to me this solution didin't work, but it may work for you:
https://stackoverflow.com/questions/36350313/visual-studio-with-unity3d-wont-work-like-it-used-to-be
By the way, the one that worked for me was changing the Build Action.
Have already tried build action method but did'nt work , tried to install nuget tool , but it says that the current installed product dont work with it , tried to unload and load the project again, recreate the script , restart unity and VS, none of that worked.
Answer by tormentoarmagedoom · Jan 07, 2018 at 12:39 AM
what program are you using for scripts? if is visual studio, when open the file, look at there.
It must say your project name. if it says Miscelaneous files, it will be "outside" your project.
Better way is:
-copy the script to a notepad
-close Visual studio
-delete the script from unity
-create a new script in Unity with same name
-open the script from unity (it opens Visual studio)
-Paste the script
And look if it says Mikscelaneous files or not
Answer by VWGoA · Jan 28, 2019 at 11:38 PM
What fixed it for me was downloading and installing .NET Framework 4.6.1 Developer Pack. There was a popup when first launching VS saying something about version differences. I ignored it because I didn't understand it, and it implied things would continue to work, but that I may choose to upgrade. Turns out I needed to upgrade to make code completion work, and "could not navigate to symbol under caret" disappear.