2

I'm using visual studio 2013 for a Unity3D project and have two .js files, one the code can fold and the other cannot. The file which has folding enabled was hasn't really been touched, but the other file I was able to fold the code when I first installed visual studio but I have lost the ability to overnight.

enter image description here

I was looking through the settings too but there seems to be an issue there where no text shows up for the Javascript section.

enter image description here

Things I have tried:

  • I installed Visual Studio Tools for Unity
  • reinstalled Visual Studio
  • changed directories of the files
  • make a new file and pasting the existing code there (only working solution so far)

It seems to be an error with opening pre-existing code, and it doesn't like some functions for example function OnTriggerEnter2D (other : Collider2D) { } it doesn't work with but does work with function SetEndTime () { } and also doesn't work with if statements which I'm sure did work before.

So I want to know why this is happening and how can I fix it?

Any help is appreciated, thanks in advance.

Nahuel Ianni
  • 3,177
  • 4
  • 23
  • 30
Drkr
  • 21
  • 2
  • You should include images directly in the question, since imgur links may go down later. – Almo Jun 18 '15 at 14:15
  • 2
    @Almo: I think there's a restriction on what brand-user users can do around images... (Though I'm not immediately finding that in the [help], so it may be old information, or just plain wrong information. :-) ) – T.J. Crowder Jun 18 '15 at 14:16
  • Happens to me many times in VS2013 when using the Ctrl + M + O and Ctrl + M + P shortcuts. Usually fixed by collapsing everything (Ctrl + M + O) or just closing and reopening the file. – Nahuel Ianni Jun 18 '15 at 14:18
  • I have seen posts related to Javascript function folding in Visual Studio, but I cannot find it now. I think it is a bug in Visual Studio. Therefore, no need to reinstall. I use JavaScript function in aspx page, so to work around, I place the function I want into its own – Just a HK developer Apr 10 '18 at 08:36

0 Answers0