Answer by trs9556
I don't use JS and I'm going on a limb here but try something along the lines of: if (GUI.Button (Rect (10,10,150,100), "Create")) { var gos : GameObject[]; gos =...
View ArticleAnswer by Graham Dunnett
`GetComponent()` returns a `Component`. That's a Unity base class. When you create a script, it inherits from `Component`. The script you create has extra members, of course, so, in your example, it...
View ArticleAnswer by uberokeer
Okay I have another problem :p My Script won't work at all! xD I have it applied to my camera The whole Script is: var Prefab : Transform; function OnGui () { if...
View ArticleAnswer by testandi
can you see in the inspector that when running the scene you have an object with tag "SetObject"? Im editing my own answer now as somebody said it is not an answer but a comment it could be that the...
View ArticleAnswer by trs9556
I don't use JS and I'm going on a limb here but try something along the lines of: if (GUI.Button (Rect (10,10,150,100), "Create")) { var gos : GameObject[]; gos =...
View ArticleAnswer by Graham-Dunnett
`GetComponent()` returns a `Component`. That's a Unity base class. When you create a script, it inherits from `Component`. The script you create has extra members, of course, so, in your example, it...
View ArticleAnswer by uberokeer
Okay I have another problem :p My Script won't work at all! xD I have it applied to my camera The whole Script is: var Prefab : Transform; function OnGui () { if...
View ArticleAnswer by testandi
can you see in the inspector that when running the scene you have an object with tag "SetObject"? Im editing my own answer now as somebody said it is not an answer but a comment it could be that the...
View Article
More Pages to Explore .....