Why is code folding working for one file but not the other?

250 views Asked by At

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.

0

There are 0 answers