As you can see, I have two variables, actionOrient and joyOrient, that are both GameObjects.
Each variable is assigned properly in the Inspector; however, when I play my game I get the following error:
I get a similar error for the joyOrient variable if I comment out the actionOrient line. What am I doing wrong here?
(comments are locked)
|
|
Turns out I had a duplicate copy of the script on the Main Camera. Deleted it and all is well again. Facepalm.jpg Facepalm x2 right here. Just had the same thing happen to me. Must've accidently dragged the C# script to another gameobject. Couldn't figure out why I kept getting 'unassigned' errors even though I properly assigned my intended GameObject. Thanks again.
Apr 19 '12 at 12:24 AM
NorthernEagle
(comments are locked)
|
|
Maybe the variables were something else, like Transform, when you assigned them? And then you changed them to GameObject later without reassigning the variables. I wish this was the case, but its not. I Wrote the script as is, then drag/dropped the assignments in the Inspector. Perhaps it is time for me to export the project files to a bundle, make a new project, and reimport the bundle, when Unity is 'funky' to me, this usually fixes things right up.
Aug 28 '11 at 05:26 PM
noradninja
(comments are locked)
|

