|
I'm really not sure why I'm getting this error, it's a very short script and I can't find a single thing wrong with it. I get a new instance of this error every single frame. The code works fine though, which is even more baffling.
(comments are locked)
|
|
try this and look at what the console prints out
The point its to check if the objects you're using http://exist.in this part the 2 objects would be: 1. the "GetComponent()" If this was missing then you might have forgotten to attach this script to the SAME GameObject. if you're calling it from another game object you should use this: GameObject.Find( "name of the gameObject" ).GetComponent();
This solved it, with a little extra debugging I found the object causing the error, this script was accidentally attached to my camera as well as every other object. It didn't have a stats script. Thanks!
Nov 07 '10 at 11:54 PM
Kyouri
(comments are locked)
|
|
Do you have a GameObject in the scene named "Ship"?
That could be it. I do, it never leaves the scene either, there is always a ship as long as anything is on screen.
Nov 07 '10 at 10:57 PM
Kyouri
(comments are locked)
|
