I have a JS script, with a function in it that I want to be globally accessible to every other script and C# function. I remember hearing somewhere that you can place scripts like this in a special folder name, was the name editor? or plugin? And then the script is compiled before other scripts, and thus accessible to all other scripts? How do I do that and where would I get more information on that?
Then, how would I go about just directly accessing that JS function from a c# script without using anything like
jsfunction JSfunction;
JSfunction = transform.find(JSscript);
(or however that work)
How do I in my c# script just directly access the JS function? I remember reading something that this was possible with just a scriptname.functionname something.
Also, is it slower to access a global function in this manner than it is to access a local function?