When we change from GameObject type to Defender type
private void SpawnDefender(Vector2 roundedPos)
{
Defender newDefender = Instantiate(defender, roundedPos, Quaternion.identity) as Defender;
}
- Why we do it?
2)How can we instantiate it if its not a gameobject anymore?
i got bit confused here.