I am trying to scale a prefab after its instantiated but the scale just doesn’t get changed and I don’t get any errors either.
here is my code:
IEnumerator spawnBird1()
{
wait = Random.Range (5f, 10f);
yield return new WaitForSeconds (wait);
Debug.Log ("spawn1");
Vector3 spawnPosition = new Vector3 (-50f, Random.Range (8f, 25f) ,8f);
Instantiate (Bird, spawnPosition , Quaternion.identity);
Vector3 scale = Bird.transform.localScale;
scale.x = 2f;
scale.y = 2f;
index = Random.Range (1,4);
switch (index)
{
case 1:
StartCoroutine ( spawnBird1() );
break;
case 2:
StartCoroutine ( spawnBird2() );
break;
case 3:
StartCoroutine ( spawnBird3() );
break;
}
}