Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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);
    }
}


Source by nullorempty.org #
 
PREVIOUS NEXT
Tagged: #delay #unity
ADD COMMENT
Topic
Name
8+9 =