fran35 fran35 - 2 months ago 13
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, Color.black, 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

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", Color.black, FullScreenMovieControlMode.Full, FullScreenMovieScalingMode.AspectFill); 
Comments