Null Refrence Exception in the Unit Script?

It’s saying I have a null reference exception on this line, but I’m not sure what’s going on.
image


As far as I can tell, I’ve assigned everything, and I even copy-pasted parts of the given scripts in the resources but the error hasn’t gone away.

In this case, unit is null. Make sure it is being set in Awake.

That worked, thank you!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms