Hello, I’m looking for a advice I want to use "Gameobject
What method can be the answer? Example:
foreach (GameObject mirror in mirrors)
{
//turn on first mirror and turn on the next one
}
Hello, I’m looking for a advice I want to use "Gameobject
What method can be the answer? Example:
foreach (GameObject mirror in mirrors)
{
//turn on first mirror and turn on the next one
}
private IEnumerator EnableMirrors()
{
WaitForSeconds wait = new WaitForSeconds( 1 );
int i = 0;
mirrors*.SetActive(true);*
for( ; i < mirrors.Length - 1 ; i++ )
{
yield return wait;
mirrors*.SetActive(false);*
mirrors[i+1].SetActive(true);
}
yield return wait;
mirrors*.SetActive(false);*
}