VRCivilisation2/Assets/Vi2.cs

23 lines
418 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;
public class Vi2 : MonoBehaviour
{
public VideoPlayer videoPlayer;
void Update()
{
if (videoPlayer.frame == (long)(videoPlayer.frameCount - 1))
{
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
#else
Application.Quit();
#endif
}
}
}