Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity wait for seconds

void start() => StartCoroutine(MyIEnumerator());

IEnumerator MyIEnumerator()
{
	Debug.Log("Hello world!");
    yield return new WaitForSeconds(3);
    Debug.Log("Goodbye world!");
}
Comment

wait in unity

    IEnumerator wait(float waitTime){ //creating a function
        yield return new WaitForSeconds(waitTime); //tell unity to wait!!
    }
    
    void Start(){
    	print("start");
        wait(1); ///using function
        print("Good night")
    }
Comment

PREVIOUS NEXT
Code Example
Csharp :: manchester united 
Csharp :: c# difference between break and continue 
Csharp :: convert array from string to int c# 
Csharp :: system command in c# 
Csharp :: instantiate an object at a certain position unity 
Csharp :: unity rotate gameobject 90 degrees 
Csharp :: c# console create window 
Csharp :: how to edit Camera.size property unity 
Csharp :: unity lookrotation lerp 
Csharp :: get remainder of number c# 
Csharp :: how to populate listbox using list<t c# 
Csharp :: itextsharp landscape a4 
Csharp :: c# create array of number from number 
Csharp :: c# repeat string x times 
Csharp :: c# boiler code shortcut 
Csharp :: c# generate random int in range 
Csharp :: unity open website url 
Csharp :: c# adding two arrays together 
Csharp :: stock span problem c# 
Csharp :: c# winforms tooltip 
Csharp :: load prefab in script unity 
Csharp :: how to stop player rotating when hit by object 
Csharp :: C# define a block as text 
Csharp :: how to unfreeze a rotation in a collider unity 2d 
Csharp :: visual studio windows form exit button 
Csharp :: unity detect if animation is playing 
Csharp :: get all sundays between two dates c# 
Csharp :: get desktop path c# 
Csharp :: convert string to short c# 
Csharp :: c sharp if string equals 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =