load scene after video ended

i have a invertedsphere with my 360 degreevideo on it and when the video end it should change the scene but my brain isnt strong enough to handle this simple problem pls help.

here my both scripts:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;
using UnityEngine.Playables;

public class startthevideomyprecious : MonoBehaviour {

	//Raw Image to Show Video Images [Assign from the Editor]
	//public RawImage image;

	//Video To Play [Assign from the Editor]
	public VideoClip videoToPlay;

	private VideoPlayer videoPlayer;
	private VideoSource videoSource;

	//Audio
	private AudioSource audioSource;

	// Use this for initialization
	void Start()
	{
		Application.runInBackground = true;
		StartCoroutine(playVideo());
	}
		

	IEnumerator playVideo()
	{
		//Add VideoPlayer to the GameObject
		videoPlayer = gameObject.AddComponent<VideoPlayer> ();

		//Add AudioSource
		audioSource = gameObject.AddComponent<AudioSource> ();

		//Disable Play on Awake for both Video and Audio
		videoPlayer.playOnAwake = false;
		audioSource.playOnAwake = false;

		//We want to play from video clip not from url
		videoPlayer.source = VideoSource.VideoClip;

		//Set video To Play then prepare Audio to prevent Buffering
		videoPlayer.clip = videoToPlay;
		videoPlayer.Prepare ();

		//Wait until video is prepared
		while (!videoPlayer.isPrepared) {
			Debug.Log ("Preparing Video");
			yield return null;
		}

		Debug.Log ("Done Preparing Video");

		//Set Audio Output to AudioSource
		videoPlayer.audioOutputMode = VideoAudioOutputMode.AudioSource;

		//Assign the Audio from Video to AudioSource to be played
		videoPlayer.EnableAudioTrack (0, true);
		videoPlayer.SetTargetAudioSource (0, audioSource);

		//Assign the Texture from Video to RawImage to be displayed
		//image.texture = videoPlayer.texture;

		//Play Video
		videoPlayer.Play ();

		//Play Sound
		audioSource.Play ();

	}
}

i tried to get a message when the video ends but nothing happend :frowning:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;

public class loadsceneaftercideomiagy : MonoBehaviour {

	private VideoPlayer videoPlayer;

	// Use this for initialization
	// Update is called once per frame
	void Update () {
			videoPlayer = gameObject.AddComponent<VideoPlayer> ();
		
		if (VideoPlayer.loopPointReached) {
			Debug.Log ("video end");
		}
	}
}

loopPointReached is not a boolean, but an event. Here is how you have to use it:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;
using UnityEngine.SceneManagement;

public class LoadSceneAfterVideoEnded : MonoBehaviour
{ 
     public VideoPlayer VideoPlayer; // Drag & Drop the GameObject holding the VideoPlayer component
     public string SceneName ;     
    void Start() 
    {
         VideoPlayer.loopPointReached += LoadScene;
    }
    void LoadScene(VideoPlayer vp)
    {
         SceneManager.LoadScene( SceneName );
     }
 }

@Hellium
ty for the answer ;D it got me this
Assets/scripts/loadsceneaftercideomiagy.cs(13,35): error CS0103: The name `LoadScene’ does not exist in the current context

and what you mean with // Drag & Drop the GameObject holding the VideoPlayer component
drag & drop it where?

@Hellium
ty for the answer ;D it got me this
Assets/scripts/loadsceneaftercideomiagy.cs(13,35): error CS0103: The name `LoadScene’ does not exist in the current context

and what you mean with // Drag & Drop the GameObject holding the VideoPlayer component
drag & drop it where?

hmm is this black magic? I cant fix the error. I guess something is spelled wrong in this line

VideoPlayer.loopPointReached += LoadScene;

but every Variation i try didnt work ( for example → videoPlayer with small letter)

Before i forget my script is called the right way LoadSceneAfterVideoEnded

yeah it works thx for your help i searched for ideoPlayer.loopPointReached += LoadScene;
and i got this I made an intro video for my game but when this video ends, how do I go to the scene with the menu? - Questions & Answers - Unity Discussions
worked fine thx @crossmedia411 and thx @Hellium

void Start(){

     videoPlayer.loopPointReached += EndReached;

}

     void EndReached(UnityEngine.Video.VideoPlayer vp)
     {
         UnityEngine.SceneManagement.SceneManager.LoadScene (“NewScene”);
     }