|
hi there out in the UNITY3D universe, is there a way to read varialbes of a script from an other gameObject? I tryed with a static var, but its do not work. how can I solve this problem? greetings from Berlin ThisIsTom
(comments are locked)
|
|
Yes there is, in fact there are many many ways. Start reading about it at these two manual pages: Also see this answer which gives more detail about creating "dragged references": How can I access other scripts and their functions? Static variables do have their uses, but they are generally not the best thing to use for general-purpose communication between gameObject scripts. Until you learn more about what static variables are particularly useful for, I would recommend to avoid using them, and instead learn the methods discussed in those manual pages. thanks a lot for this great help greetings
Jan 08 '10 at 11:31 AM
Tom de Jank
remember to click the 'accept' tick icon if the answer solved your problem.
Apr 01 '10 at 11:28 AM
duck ♦♦
he forgot to accept the answer. thanks a lot anyway.
Nov 24 '11 at 02:14 PM
rhose87
(comments are locked)
|
