Delay Unity C# Code Example


Example 1: Time delay C# unity


void start()
StartCoroutine(Text());

IEnumerator Text() // <- its a standalone method
{
Debug.Log("Hello")
yield return new WaitForSeconds(3)
Debug.Log("ByeBye")
}

Example 2: how to delay something in c# unity


Invoke("DoSomething", 2);//this will happen after 2 seconds

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable