Answers for "unity delay script"

C#
15

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")
}
Posted by: Guest on March-07-2020
8

wait time in unity

using System.Collections;

private void Start()
{
	StartCoroutine(Wait());
}

IEnumerator Wait()
{
	//To wait, type this:
  
  	//Stuff before waiting
	yield return new WaitForSeconds(/*number of seconds*/);
  	//Stuff after waiting.
}
Posted by: Guest on July-12-2020
7

delay in unity

Invoke("functionname", seconds);
// this is for C#
Posted by: Guest on March-21-2020
8

how to delay something in c# unity

Invoke("DoSomething", 2);//this will happen after 2 seconds
Posted by: Guest on June-16-2020

C# Answers by Framework

Browse Popular Code Answers by Language