Answers for "how to add delay in update in unity"

C#
12

delay in unity

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

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);
    }
}
Posted by: Guest on March-15-2022

C# Answers by Framework

Browse Popular Code Answers by Language