Why does Unity make it so difficult to play videos on Multiple platforms with one script?

I don’t understand why Unity makes it so difficult to work with videos for multiple platforms?

And why is it that Handheld.PlayFullScreenMovie is so much easier to work with than MovieTextures?

The Handheld.PlayFullScreenMovie works exactly like how I would want it to, it plays the movie while automatically pausing your game, then resumes the game after the movie is finished. Simple, great, fantastic!

But then Movie Textures require you to do all this manual set up like pausing the game, creating a new texture, using a new sound clip, disabling GUI behind said texture, etc…

Why in the heck would mobile have a superior movie playing option than PC???

I just don’t understand why they do it like this. If you can play a movie flawlessly with a single line of code on Mobile I would expect superior more powerful platforms to also have this option…

To make matters worst trying to get the scripts to differentiate between the current platforms to play the movie correctly on all of them is a serious pain…

I had it working correctly on Android/PC but not for the Editor. Scrapped all that code because it was stupid and trying to find a proper solution…

And why does #if UNITY_STANDALONE or #if UNITY_STANDALONE_WIN cause all the following text to be green like it’s not going to work???

But #if UNITY_ANDROID works perfectly?

And why so little official documentation on this issue? No in depth explanation of how it works, not even many forum posts on this topic that I can find…

In short I am really annoyed with Unity and I really think with modern technology they could do a much better job to make videos play easily in multiple platforms…

I had it working fairly well but I am so OCD I won’t be satisfied until I understand everything and it works flawlessly, which doesn’t seem like it’s easy to do currently.

Open to any help or suggestions on this topic…

Hi! there,

PlayFullScreenMovie uses the standardized video player on handheld devices. This is built into the devide and is acctually a seperate program alltogether. The reason it pauses, is because your other program is technically on standby.
PC does not have a standardized video player. You could run (for Linux) VLC and for other OS, their standard player. But that would just be plain stupid and over the top.
The reason it’s hard to play video, is generally because: It’s hard to play video.

Hope this helps,
Benproductions1

PS: Why would you use the same program for both mobile and desctop builds??? Your digging yourself a hole there!
Ports are a nessecary evil :slight_smile:

Whoops forgot to mark this as solved when I finally figured it out a few weeks ago. So it turned out all my problems were due to:

#if UNITY_EDITOR

By removing that and only using:

#if UNITY_ANDROID
//Start Android Video
#endif

#if UNITY_STANDALONE_WIN
//Start Windows Video
#endif

And both those platform dependent compilations work just fine in the Unity Editor because the editor is meant to simulate your current platform.

So moral of the story is don’t use:

#if UNITY_EDITOR

At least I haven’t found a use for it yet…