I’m getting nothing at all when I use Handheld.PlayFullScreenMovie in the Unity Editor - no errors, nothing in the game window. Is this supposed to work? My video is an MP4 in the Assets/StreamingAssets folder, and my entire code is:
function Start ()
{
Debug.Log("Playing Video");
Handheld.PlayFullScreenMovie("Video_01.mp4");
}
which is in a script placed on a single GameObject in an otherwise empty scene. “Playing Video” shows in the Console, that’s it.
Thanks. The docs should be more clear then, I figured that meant the video wouldn’t play in a standalone build, but would still play in the editor if the editor was set to a handheld platform (since that’s how the rest of Unity works, when not using a plugin). I tried for over an hour to figure out what I was doing wrong, why the video wasn’t playing.
Really, video playback in Unity seems like it’s still an early hack - super limited in handhelds (we are going to have to change our entire video system to build our PC game for tablets), totally different interface and functionality between handhelds and standalone (and Windows Phone and console, I guess), won’t play in the editor on handheld (but will on standalone). And no option on handhelds for software decoding though recent handhelds and tablets are now quite powerful, no option on standalone for hardware decoding.
The editor, and standalone builds support movie textures, which is the way that videos get played in Unity. Movie textures are not supported on mobile platforms, so we provide fullscreen playback instead. On mobile we just use the platform-specific movie playback, using whatever hardware decoding the device has. Movie textures are decoded in software using Ogg Theora, and uploaded to the GPU frame-by-frame to be used as a texture. There is no stream-a-movie-and-play-it-back-VLC-style in Unity.
In that case, the only way to have movies playback in fullscreen for standalone and webplayer is to create a movie texture, and make it temporarily appear in front of (and zoomed to the frame of) the camera?