But i need more enemy, so how i can use FindGameObjectWithTag??
public GameObject [] enemy;
enemyScript EScript;
void Start ()
{
GameObject[] enemy = GameObject.FindGameObjectsWithTag ("Ghoul");
EScipt = enemy.GetComponent<enemyScript> ();
//This is wrong, but how i can make it better,,
}
I know this answer is a bit late but a more update to answer to this could be something like this which is fewer lines of code but don’t know if this is the most efficient way to do this.