Stranar/Assets/Scripts/loadGameAftexsecs.cs

27 lines
554 B
C#
Raw Permalink Normal View History

2022-06-27 11:54:53 +02:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class loadGameAftexsecs : MonoBehaviour
{
public int secondsToWait = 5;
// Start is called before the first frame update
IEnumerator Startx()
{
yield return new WaitForSeconds(secondsToWait);
SceneManager.LoadScene("Game");
}
void Start()
{
//start coroutine
StartCoroutine(Startx());
}
// Update is called once per frame
void Update()
{
}
}