3
\$\begingroup\$

I am using Visual Studio 2013 pro and Unity 4.6.

Whenever I write scripts (javascript or c#) for anything and open it up in Visual Studio, I don't get IntelliSense.

How to fix this issue?

\$\endgroup\$
  • \$\begingroup\$ Try opening the solution file instead of individual cs files. \$\endgroup\$ – Ben Mar 19 '15 at 11:16
  • \$\begingroup\$ At risk of asking the obvious: are you adding comments that begin with /// <summary> /// /// </summary> \$\endgroup\$ – Plastic Sturgeon Mar 19 '15 at 23:08
3
\$\begingroup\$

The reason that this occurs is because Visual Studio can't find the dll files for Unity without opening a specialized solution file. This file can be created using UnityVS, which can be found as "Visual Studio Tools for Unity" in the Visual Studio gallery. After installing this (make sure you have Unity closed when you do), open Unity, and a new tab will be present called "Visual Studio Tools". Click this, and click the button that says "Generate solution file" or similar, depending on the version of Unity and UnityVS that you are using.

Thanks to @IcyDefiance in chat, I can now say that UnityVS definitely does not support UnityScript or Boo, as said on their website. This is since version 1.9.x was released.

C# only: C# being the predominant language in the Unity ecosystem - the new Sample Assets are in C#, the Unity documentation will default to C# - we removed our basic support for UnityScript and Boo to better focus on the C# experience. As a result, VSTU solutions are now C# only and are much faster to load.

\$\endgroup\$
  • \$\begingroup\$ Did that but still not getting intellisense in javascripts \$\endgroup\$ – AVIK DUTTA Mar 23 '15 at 12:40
  • \$\begingroup\$ My guess for this is that since the js doesn't have any dll files, that VS can't find any of the functions to provide intellisense for. I think that C# is going to be the only viable option if you want to use intellisense (at least in VS). \$\endgroup\$ – Pip Mar 23 '15 at 15:57
  • \$\begingroup\$ yes that might be the case .. \$\endgroup\$ – AVIK DUTTA Mar 24 '15 at 8:35
  • \$\begingroup\$ @AVIKDUTTA would you accept this answer? JavaScript intellisense does not seem to be an option, since UnityScript is not actually true JavaScript so VS cannot handle it. I have answered your question to the best of anyone's ability. \$\endgroup\$ – Pip Apr 17 '15 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.