When creating my project i tried to change scenes after 15 seconds by using C#
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Changer : MonoBehaviour {
IEnumerator Wait()
{
yield return new WaitForSeconds(15.0f);
}
// Use this for initialization
void Start () {
Wait();
SceneManager.LoadScene(1);
}
// Update is called once per frame
void Update () {
}
}
I run the program but instead of waiting 15 seconds it immediately changed to the next scene. If you can help me please do so. :)