i want to activate child objects in an order at 2 seconds gap. i have tried this code but didnt work.
Thank You
void Update()
{
if (Input.GetKeyDown(KeyCode.A))
{
for (int a = 0; a < transform.childCount; a++)
{
transform.GetChild(a).gameObject.SetActive(true);
StartCoroutine(waiter());
}
}
}
IEnumerator waiter()
{
yield return new WaitForSeconds(2);
}