Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug WaitForSeconds doesn't work

Discussion in 'Unity MARS' started by unity_zfKQjXzJKzk1ow, Oct 26, 2022.

  1. unity_zfKQjXzJKzk1ow

    unity_zfKQjXzJKzk1ow

    Joined:
    Jun 6, 2022
    Posts:
    7
    Hi,

    This is my code:
    Code (CSharp):
    1. yield return new WaitForSeconds(8);
    2. Debug.Log("1");
    3. yield return new WaitForSeconds(30);
    4. Debug.Log("2");
    5. GameObject.Find("MainScreen").GetComponent<AudioSource>().enabled = true;
    6. yield return new WaitForSeconds(3);
    Why, if don't move a inch in my AR application the second WaitForSeconds never ends?
    But when I move a second the mouse, it executes exactly from that time?

    Thanks!