Full Error: "NullReferenceException: Object reference not set to an instance of an object EnemyPatrol.death() (at Assets/Scripts/EnemyPatrol.cs:57)
So this is not an error i get when i compile my code, only when i trigger the 'death()' function. I want to add an amount to my score but i get this error. Im not too sure why this is happening and i'm fairly new to unity and UnityEngine so very confused about this. I have my 'EnemyPatrol' Script and the 'GuiAndStuff' Script, ill post both below to...
Getting error "NullReferenceException: Object reference not set to an instance of an object" (C#)
So this is not an error i get when i compile my code, only when i trigger the 'death()' function. I want to add an amount to my score but i get this error. Im not too sure why this is happening and i'm fairly new to unity and UnityEngine so very confused about this. I have my 'EnemyPatrol' Script and the 'GuiAndStuff' Script, ill post both below to...
Getting error "NullReferenceException: Object reference not set to an instance of an object" (C#)