Accessing java script variables in a c# script

I have a java script that I need to be able to access info in a c# script. I’m not even sure if this is possible, but if it is, I’m haven’t the slightest on the syntax.

Ex.
StateControl.js

enum GameStates { Idle = 0, Presentation, Spin, Results, SpinWithCamera, Offline };

MainControl.cs

public class Control : MonoBehaviour
{
  //this is where the accessing problems are, I would like to use the enum from
  //StateControl.js
  void checkStates(GameStates newState, GameStates oldState)
  {
    //do stuff
  }

}

I’m not 100% sure about JS syntax either, but so long as the enum is public (i think in JS, if it’s outside the class it’s automatically public?), a C# script should still be able to access it. The reason you can’t access it now is probably because it thinks it’s a member of StateControl… so you could still technically access it using StateControl.GameStates

hope that helps

Put the JS in the Standard Assets folder. That’s what I’ve had to do to access JS from C#.