|
hey, can i use a string variable (whichGemIGot) that is equal to a gameObjects name (Gem - Blue) ??? what i have now gets NullReferenceException I know this is probably wrong i just cut out the bits that seemed needed to understand my situation. :P
(comments are locked)
|
|
Remember that instantiated objects have (Clone) on the end of their name by default It'll my bet is you need to search for "Gem - Blue (Clone)" instead Thankyou, i did add this, but it still doesn't work :'(
Dec 28 '10 at 01:56 PM
Jason Hamilton
scratch that, i added a space but didn't need to :P
Dec 28 '10 at 02:08 PM
Jason Hamilton
im still having problems, i made a video of the problem; http://vimeo.com/18361778
Jan 04 '11 at 06:06 AM
Jason Hamilton
(comments are locked)
|
|
Yes you can. If no child with that name exists the function will return null. but i can see the object at runtime, it still doesn't work?
Dec 28 '10 at 12:42 PM
Jason Hamilton
Is it a child of the object that your script is attached to? Is it a direct child?
Dec 28 '10 at 01:16 PM
StephanK
the script is applied to the parent, the child is a direct child
Dec 28 '10 at 01:57 PM
Jason Hamilton
im still having problems, i made a video of the problem; http://vimeo.com/18361778
Jan 04 '11 at 06:06 AM
Jason Hamilton
(comments are locked)
|
