Quantcast
Channel: Answers for "Anyone know what's wrong with this code? (SOLVED)"
Browsing all 8 articles
Browse latest View live

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 Article



Answer 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 Article

Answer 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 Article

Answer 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

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 Article


Answer 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 Article

Answer 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 Article

Answer 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

Browsing all 8 articles
Browse latest View live




Latest Images