Duplicate Question : http://answers.unity3d.com/questions/47830/what-is-a-null-reference-exception-in-unity.html
Boolean prevent script from working
I followed a tutorial I found on YouTube on how to program a simple A.I. everything was working fine and things were working as the tutorial said they should be, until I added Booleans to the animations. now the NPC just stands there and repeats his idle animation but wont follow me when I get close. an error comes up saying "NullReferenceException: Object reference not set to an instance of an object Chase.Update () (at Assets/Chase.cs:44)" but I have checked spelling and everything seems to be linked up and working as well as checking my code to the one used in the tutorial, and I cant see any difference. any help would be apprieated. many thanks