|
I made an objectA that has a script attached to it. I am accessing this objectA in a script that is located in another objectB. I am having trouble accessing the script of ObjectA from ObjectB. Could someone help, please.
(comments are locked)
|
|
You don't really describe enough to know what's wrong, so I'll just explain how to do what you describe in the general case and you can fix what you are doing wrong/differently. scriptA.js (Attached to object A)
scriptB.js (Attached to object B)
or in mono (C#) scriptA.cs (Attached to object A)
scriptB.cs (Attached to object B) Holy crap you rock, seriously all i did wrong was ScriptA bar = GetComponent(); instead of ScriptA bar = objectA.GetComponent(); Thank you so much
Oct 15 '10 at 11:37 PM
LifeSizeDeity
(comments are locked)
|
