Change Canvas on VideoPlayer LoopPointReached

Total Noob/No Code.

I’ve built a touchscreen interface for an Android device that plays 3 videos from a looping video menu. I have all the interactions working - press button to play video, press button to return to menu - but I cannot workout how to return to the main menu when a video has finished playing.

Each videoPlayer is on a Canvas and I am using the onClick functions of buttons to call them up/remove the previous. I have zero code literacy - is there a simple way a poor fool like me can just return to the Menu canvas when a video has reached the end? A simple script on each Canvas component is obvious to me but how to script it is not.

Unfortunately, you need to use code for that. You can use this script to do that. Make sure, the file name is VideoPlayerEndReachedEvent like the script.

using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Video;

public class VideoPlayerEndReachedEvent : MonoBehaviour
{
    public UnityEvent OnEndReached;
    public VideoPlayer videoPlayer;

    // Start is called before the first frame update
    void Start()
    {
        videoPlayer.loopPointReached += VideoPlayer_loopPointReached;
    }

    private void VideoPlayer_loopPointReached(VideoPlayer source)
    {
        OnEndReached.Invoke();
    }
}

In the Editor, it should look like this.
8184926--1066346--upload_2022-6-6_16-1-40.png