W
W
WasTabon2021-08-28 01:00:58
Unity
WasTabon, 2021-08-28 01:00:58

Checking if the video is currently playing?

I need to load a certain scene after playing a video through VideoPlayer, but how can I know when the video is over?

while (...isPlaying)
{
    yield return new;
}

does not fit, because I call it all in void, but it gives an error

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikolai Sokolov, 2021-08-28
@WasTabon

Here is the required callback. If the video is without a loop, it will be called at the end of the video (hands should be beaten for such titles)

S
Spartanec33, 2021-08-28
@Spartanec33

I don’t know why I didn’t notice this in the manual, well, in general, the VideoPlayer class has an isPlaying property

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question