I’m a beginner in Unity and I’m creating an enemy for my 2D game. However, when I launch the game Unity tell me: NullReferenceException: Object reference not set to an instance of an object.
I don’t understand why Unity is putting this on me! However, it must be taken into account that the script is a Behaviour.
Here is my script. There is apparently an error line 28. Please tell me what to write to fix the problem!
Thank you and have a good day !