using System.Collections;
using System.Collections.Generic;
using UnityEngine.SceneManagement;
using UnityEngine;
using UnityEngine.Video;
using UnityEngine.Timeline;
public class EKKOVideo : MonoBehaviour
{
public VideoPlayer mVideoPlayer = null;
public void Start()
{
mVideoPlayer.loopPointReached += FinishedVideo;
}
public void FinishedVideo(VideoPlayer player)
{
StartCoroutine(StartLoadScene());
}
IEnumerator StartLoadScene()
{
yield return new WaitForSeconds(300f);
SceneManager.LoadScene("MainScenes");
}
}
I made the screen change 5 minutes after the video is over, but I would like to reset the time if I click the video again within 5 minutes. What should I do?