If you click on the Core Game Area, you get the error the object you want to instantiate is null. here is my solution :
2 Likes
Thanks for sharing that.
I noticed the same error and I hadn’t considered using a bool. I ended up checking if defender is null.
if (defender)
{
Instantiate(defender, roundedPos + defSpawnOffset, Quaternion.identity);
}