i have a video for my Gamee Studio lol, it lasts about 5 seconds before taking the player to the title screen.
it works, but i think it might be overkill
is there a way quicker way of doing this?
heres my script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class VideoIntro : MonoBehaviour
{
private bool videoEnded = false;
void Update ()
{
StartCoroutine(IntroTimer());
if (videoEnded)
{
SceneManager.LoadScene("TitleScreen");
}
}
IEnumerator IntroTimer()
{
yield return new WaitForSeconds(6.5f);
videoEnded = true;
}
}