Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Getting error "NullReferenceException: Object reference not set to an instance of an object" (C#)

$
0
0
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#)

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>