okay so im new to unity and would like some help i am making a 2D platformer.
my issue is when my player hits the enemy and is “kill” it destroys the gameobject of the player and the main camera has nothing to follow so it causes an error.
MissingReferenceException: The object of type ‘GameObject’ has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
CameraSystem.LateUpdate () (at Assets/Scripts/CameraSystem.cs:20)