I am new to “unity Script”, which seems to actually be fake javascript, and I’m not sure just how strict it is.
In plain old “nothing’s sacred” Javascript, you can have, for instance:
var canvas;
canvas = document.getElementById("cvs");
canvas.my_New_Attribute_Out_Of_Thin_Air_Because_Javascript = { "and" : 1,
"this" : 2,
"was" : "awesome"
};
Now it has come to my attention that this poop don’t fly with unityScript…
My question is, is there any similarly convenient way to assign some attributes to some object?
The reason I wanted this behaviour, is that I have a large project with objects like “special_box : GameObject” already used in various places/ways, and it would be annoying to turn that into a data structure which contains “special_box” and other properties…