Video Player help

Hey, i got my video player and my video but i wan’t my video to be started after a timer, could you help me in the code? thank you ! :slight_smile:

so…

void Awake()
{
    StartCoroutine(DelayedPlay());
}

IEnumerator DelayedPlay()
    {
        yield return new WaitForSeconds(5f);
        videoPlayer.Play();
    }

Something along those lines? Or what do you mean?

1 Like

Like i have my camera animation that is a 30 seconds animation, the first 10 seconds we don’t see the screen and the video, i would like that the screen wait x seconds before video start and thanks for your answer

Still need some help ! :slight_smile:

Should be able to do the same code, just change the wait to 10f. You should call the coroutine in start. You can set the wait time to be whatever you want.

If you don’t want it to start till after the animation, you could set it to 30 secs or play after the animation finishes, but otherwise, this should work all the same.