I mainly worked in Flash and AS3, and I am a bit "noob-ish" on Unity's language. I was wondering how can a add a custom value/property to an object, for example:
and could a custom boject value be stored in a array with the object?
Now let us assume that you have a GameObject which has an attached Script (eg. MyScript). You can get a reference to that component with:
Now you have a reference to your instance of MyScript attached to the Game Object, you can access its properties:
The properties within a Script can include arrays.
answered May 08 '12 at 08:50 PM