Cant get C# to talk to JavaScript

Hello,

I have a C# script that needs to get a variable from a JavaScript script. Here is a snippet of my C# script:

itm.knifeInventory = StoryControl.inventoryKnife;

StoryControl.inventoryKnife is a JS variable, but I get a "The name 'StoryControl' does not exist in the current context"? How can I grab the variable from the JS without using a GetComponent (because the scripts are not on the same object)

Thanks

Put the C# script in the Standard Assets folder.

Put the C# script in the Standard Assets folder and make sure your JS file is outside of the Standard Assets folder. ;)

The JS has to compile before the C# script. On this page of the documentation you get a detailed description of the compile order in Unity.