Horje
delay in unity Code Example
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")
}
delay in unity
Invoke("functionname", seconds);
// this is for C#
unity c# delay function
void start()
{
  Invoke("DoSomething", 2);//this will happen after 2 seconds
}
void DoSomething()
{
	Debug.Log("2 seconds has passed!");
}
delay in unity

using UnityEngine;
using System.Collections;
    
public class WaitForSecondsExample : MonoBehaviour
{
    void Start()
    {
        StartCoroutine(Example());
    }

    IEnumerator Example()
    {
        print(Time.time);
        yield return new WaitForSeconds(5);
        print(Time.time);
    }
}






Csharp

Related
unity mouse look script 2021 Code Example unity mouse look script 2021 Code Example
c# monogame mouse position Code Example c# monogame mouse position Code Example
unity gameobject.find not working Code Example unity gameobject.find not working Code Example
system command in c# Code Example system command in c# Code Example
get key unity Code Example get key unity Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
13