VideoPlayer loopPointReached called twice

Tested with the following code, seems to be called at the end of previous loop and start of new loop.

public class Tester : MonoBehaviour
{
    [SerializeField]
    private VideoPlayer _videoPlayer;

    private void OnEnable()
    {
        _videoPlayer.loopPointReached += VideoPlayerOnLoopPointReached;
    }

    private void OnDisable()
    {
        if (_videoPlayer)
        {
            _videoPlayer.loopPointReached -= VideoPlayerOnLoopPointReached;
        }
    }

    private static void VideoPlayerOnLoopPointReached(VideoPlayer source)
    {
        Debug.Log("Looped " + Time.time);
    }
}


1 Like