I found this useful documentation:
file:///C:/Program%20Files%20(x86)/Unity/Editor/Data/Documentation/Documentation/ScriptReference/WaitForSeconds-ctor.html
I tried it out, yet surprisingly, I found it did now work!
using UnityEngine;
using System.Collections;
public class Mover : MonoBehaviour {
IEnumerator Example(){
yield return new WaitForSeconds(5);
Debug.Log("hi");
} }
Ok, I am confused, I keep getting errors.
This is what I’m trying to accomplish:
The script to wait 5 seconds before doing anything after it.
(only in that script, not the other ones)