- Home /
Question by
omniscient232 · Nov 13, 2011 at 01:20 PM ·
c#javascriptinspector
Javascript equivalent of an inspector C# public List?
In my C# scripts i'm used to declaring public List variables on monobehaviours, so that I can give gameobject references in the inspector in the scene. I use this for example to activate enemies when a trigger is activated. I give the references of the enmy gameobjects to the List in the inspector of the trigger.
I'm now forced to write a trigger in javascript because the team i'm in uses javascript. How could I do this in javascript? an Array that can be accessed in the inspector, to put Gameobjects in?
Comment
Best Answer
Answer by Eric5h5 · Nov 13, 2011 at 02:56 PM
It's the same as in C#, you just use JS syntax.
var go1 : GameObject[];
var go2 : List.<GameObject>;