|
Hellow, I want to change a variable of the script inside an instantiated object... after it been instantiated, how do I achieve this? Here is the script. var MeteorPrefab : GameObject; var STarget : GameObject;
The problem it return, is that the object is Unexistant and so the script is too. Here are the two errors.
and
(comments are locked)
|
|
For the first one, try this:
For the second one, make sure you have assigned your script to a game object, and on that game object, you have selected something for both MeteorPrefab and STarget in the Inspector pane. Tried, doesn't work. The meteor spawn with his script, the variable just doesn't change as it should.
Oct 26 '10 at 11:27 PM
Oninji
How about trying "var Meteor : GameObject = Instantiate(MeteroPrefab,....)" instead?
Oct 27 '10 at 01:40 AM
zannghast
(comments are locked)
|
