I was trying to allow player and enemy collide and this error appeared from nowhere.
Its "NullReferenceException: Object reference not set to an instance of an object
Enemy.ProcessHit (DamageDealer damageDealer) (at Assets/Scripts/Enemy.cs:61)
Enemy.OnTriggerEnter2D (UnityEngine.Collider2D collision) (at Assets/Scripts/Enemy.cs:56)"
I am stuck with an issue.
According to me, when player collides with the enemy it triggers the collider 2d to start the destruction of both enemy and player. They both have colliders and they are calling the Hit() method from DamageDealer script.
I am attaching the scripts snaps of enemy as error goes in line 56, 61.