Я хотел бы назвать метод, когда фильм закончил играть. До сих пор этот метод является лишь отладочной.
Код: Выделить всё
using UnityEngine;
using UnityEngine.Video;
public class MovieController : MonoBehaviour
{
private VideoPlayer m_VideoPlayer;
void Awake ()
{
m_VideoPlayer = GetComponent();
m_VideoPlayer.loopPointReached += OnMovieFinished; // loopPointReached is the event for the end of the video
}
void OnMovieFinished(VideoPlayer player)
{
Debug.Log("Event for movie end called");
player.Stop();
}
}
Подробнее здесь: https://stackoverflow.com/questions/446 ... ed-playing