- Home /
This question was
closed Jan 21, 2015 at 02:54 PM by
GameVortex for the following reason:
Duplicate Question
Question by
daco2000 · Jan 21, 2015 at 02:48 PM ·
instantiate-game-object
Instantiate Game Object from different Script in different Objects
I have a GameObject stored in a static variable in a script1 in Object1
static GameObject Immagine;
And I want to instantiate the gameObject with script2 in Object2
var g : GameObject;
g=Instantiate(script1.Immagine);
Dose anybody knows what should I write instead? THX
Comment
This has been answered many times before. Please use the search feature before posting a question.
http://unity3d.com/search?refinement=answers&gq=access%20other%20script
Follow this Question
Related Questions
Looking to destroy clone of gameobject without destroying original 1 Answer
Instantiate GameObject on Enum Selection from Inspector 1 Answer
Cloned gamObject have no gravity on release/detach,Cloned gameObject have no gravity 0 Answers
how can I stop instantiate process 1 Answer
How can I have an access to the rigidbody component of each instantiated object? 1 Answer