Modify the variables of that returning gameobject.

Hey Guys,
Im trying to create a battle system for my game, So far i’ve got an enemy queue so pretty much gets a random enemy from an array and puts in a queue but my question is how would i modify the enemy i get so the health, level is sort of random before i add it to the queue.

void battleEasy()
	{
		int j = 0;
		for( int i = 0; i < enemyQueue.Length; i++)
		{
			GameObject en = enemyInfo.enemyPoolEasy[Random.Range(1, enemyInfo.enemyPoolEasy.Length)];
			Debug.Log(en);
			enemyQueue[j] = en;
			j++;
			enemyInfo.battleStartEasy = false;
		}

	}

These are the fields i want to modify before i add it to the queue.

public class enemies : MonoBehaviour 
{
	public int enemyLevel;
	public int enemyPower;
	public int enemyHealth;

Thanks for any help.

Get the enemies script component from the gameobject.

en.GetComponent<enemies>().enemyHealth = 1337;

or

enemies enemy = en.GetComponent<enemies>();
enemy.enemyLevel = 5;
enemy.enemyPower = 9001;
enemy.enemyHealth = 1337;