How to access script variables attached to a prefab at runtime in Javascript?

I have a script that generates a grid of prefab tile objects at runtime. I have attached a script to the prefab that contains a single Vector3 to store the grid coordinates of each tile as it's instantiated. How do I access the script component of the prefab from the script instantiating them? I've tried a bunch of different things, but they don't work because a prefab isn't a class.

Thanks for any help.

If I understand correctly, you'd do it just like any other object. Once instantiated, you can access the component (script) then anything in it: http://unity3d.com/support/documentation/ScriptReference/index.Accessing_Other_Components.htmland http://unity3d.com/support/documentation/ScriptReference/index.Accessing_Other_Game_Objects.html

The prefab isn't a class, it's an object, but you can get the component (script) off an object, thus stuff in that script.

If that doesn't do it for you, can you post some code?

< YourObjec type> GirlAnimation=(Resources.Load(“GirlAnimation”)) as BoneAnimation;

Your prefab should be keep in assts/Resources forlder then you can use it