Is there a way to make script way to continue for few seconds? I mean program would run, then stop on some row, wait there for few sec and then jump on next row.
            Asked
            
        
        
            Active
            
        
            Viewed 31 times
        
    1 Answers
0
            It's a bit trickier in C# than JavaScript, because you have to declare a coroutine.
using UnityEngine;
using System.Collections;
public class WaitForSecondsExample : MonoBehaviour
{
    void Start()
    {
        StartCoroutine(Example());
    }
    IEnumerator Example()
    {     
        yield return new WaitForSeconds(5);
    }
}
in JS it's just
yield WaitForSeconds(5);
 
    
    
        Daniel Piskorz
        
- 390
- 1
- 2
- 11
