Callback for Handheld.PlayFullScreenMovie when video is played

Hello, I think the title quite cover the issue here but I’m gonna go a little further to avoid misunderstanding! :o

I’m developping a game for multiple plateform (Mac, Win, Web, Android and iOS) and instead of using MovieTexture to play video, I use the function “Handheld.PlayFullScreenMovie” for Android and iOS.

I have to say, it works quite well but I’m wondering if a callback exist for this method when the video just finished playing to continue do things with my game just after playing my intro video for exemple.

Thanks in advance for the replies, I’ve looked on google for the morning but I didn’t find anything!

Handheld.PlayFullScreenMovie freezes your Unity so when the movie has finished it executes the first line after this command. So you don’t need a callback.
Example :

Handheld.PlayFullScreenMovie( ... );
MyCallBack();

Oh thanks, I didn’t realize that UNITY was actually freezed. I’m gonna try that right now.

Be careful anyway because sometimes Unity doesn’t freeze immediately so your callback may be called before the movie (it happened to me sometimes).
So to be sure i waited a couple of time before calling my callback but i know it’s not a proper way to do that.
Maybe someone else has another solution :stuck_out_tongue:

Handheld.PlayFullScreenMovie( ... );
yield return new WaitForSeconds( fTime );
MyCallBack();

Yes I just experienced that, my GUI flashed the screen just before my video started and I had the same idea as you, a bit sketchy but it does the job! :slight_smile: