|
Hello. I'm playing around in Unity3D 3. I'm rewriting this JS code:
Into C#:
But I always get a "NullReferenceException: Object reference not set to an instance of an object" when I hit my Fire1 button. I think there is a variable type problem, but I cant solve it :( Please help. Thanks, Erhan
(comments are locked)
|
|
Your translation isn't entirely off, but your problem is not one of type and would have happened in the original javascript. Here's a literal translation of the first script:
For help with translation, this is a useful link. Your problem is in one of these possible locations:
You can add some checks to avoid this problem altogether: Thank you very much! Now it works fine! :)
Oct 28 '10 at 04:26 PM
Erhan
(comments are locked)
|
