Dienstag, 11. Februar 2020

Unity 3d - wait a few seconds / sleep

C# - How to wait a while in Unity 3d see https://docs.unity3d.com/ScriptReference/WaitForSeconds.html
...
StartCoroutine(TimeRoutine());
...
IEnumerator TimeRoutine()
{
       yield return new WaitForSeconds(3.0f); // wait 3 seconds within this TimeRoutine thread
       //load the next scene then for instance
}



0 Kommentare:

Kommentar veröffentlichen

Abonnieren Kommentare zum Post [Atom]

<< Startseite