- Home /
Question by
yuto saito · May 23, 2015 at 02:31 PM ·
unity 5animatorscript error
NullReferenceException error
sorry, i don't speak english well.
please show under the image.
script
this is an error message when I press the up key .
please help me.
スクリーンショット-1.png
(178.1 kB)
スクリーンショット-2.png
(231.7 kB)
Comment
you're defining a local variable 'a' in Start
, and not setting the value to the previously defined 'a'.
change line 10 to:
a = GetComponent<Animator>();
in future, when posting code, post the actual code and not a screenshot of it.