1

Well, Visual Studio does not detect the Unity3D syntax at all. For example, when I type Input. it should normally be unity options, but it does not show me such. It does not even show me the colorful syntax of this. As if it was a plain text file and not a C#. Print Screen: https://i.stack.imgur.com/7P5LO.jpg

EDIT: Tools for unity are installed: Here

TracerYT
  • 11
  • 3
  • Sounds like the Unity tools weren't installed. – Draco18s no longer trusts SE Mar 18 '19 at 16:50
  • 1
    Is the `UnityEngine` namespace inclusded on the top of the file? I had this sometimes in the past as well .. for me it helped to A) close VS and Unity, start Unity and doubleclick a script -> VS finds the Unity dlls now B) if A didn't work: Close everything, remove anthing except the `Assets` and `ProjectSettings` folders, than open Unity and let it recompile. – derHugo Mar 18 '19 at 16:52
  • I suspect the 3 lines above the top of the screenshot would give us a better idea of the problem. – Neil Mar 18 '19 at 16:57
  • KK I found an answer! This tutorial help me in my problem: https://stackoverflow.com/questions/42597501/autocompletion-not-working-in-visual-studio – TracerYT Mar 20 '19 at 06:43

2 Answers2

0

Sometimes, VS fails to recognizes Unity classes and libraries because there are compile errors. Try to compile your code and resolve any error.

Also you may want to open VS from Unity Editor by double-clicking on the script you want to modify. This may solve your issue. However all of these are not your fault. These are because of some issues with Unity plugin for VS.

Kamran Bigdely
  • 7,946
  • 18
  • 66
  • 86
0

I Fixed my issue by going into Unity preferences and making sure VS is selected and not open by file extension.

Carrot
  • 1