fran35 fran35 - 1 year ago 144
C# Question

Android PlayFullScreenMovie

I'm trying to play a movie located in Assets/StreamingAssets in Unity 5.5b3 player is android. Movie works If I stream from internet, so format shouldn't be the problem.

This is what I'm using:

filePath = System.IO.Path.Combine(Application.streamingAssetsPath, "lt.mp4");
Handheld.PlayFullScreenMovie(filePath,, FullScreenMovieControlMode.Full, FullScreenMovieScalingMode.AspectFill);

However I only get a blank scene (script is attached to camera), code in Start method.

What am I missing?

Answer Source

Use the video name without the Application.StreamingAssetsPath url. By default, Unity will look for the video in the StreamingAssets directory. This is for Android. I don't know if this applies to iOS too.

Handheld.PlayFullScreenMovie("lt.mp4",, FullScreenMovieControlMode.Full, FullScreenMovieScalingMode.AspectFill); 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download