We have a script attached to an object that has a VideoPlayer and some video. We want to know (be subscribed to) when the video ends, so we can decide then to play another or do something else.
void Start()
{
videoPlayer.loopPointReached += Method();
}
VideoPlayer.EventHandler Method()
{
Debug.Log("it ended");
return null;
}
And the log is not coming out when the video ends.
The reference to videoPlayer exists, and the video plays, pauses and stops with no issues.
We find solutions that include counting frames and so on, but we're hoping for a more elegant solution.