For the use of video playback in unity, here is a very detailed article, refer to the Unity3d Institute of two ways to play video game
This article mainly for the Android platform call video resource storage location write a note.
The interface for mobile platform video playback calls is as follows:
Public Static BOOL Playfullscreenmovie (string path, Color bgColor, Fullscreenmoviecontrolmode Controlmode, Fullscreenmoviescalingmode Scalingmode);
For Android platforms, after testing, the following methods can be successfully played:
1. Copy video resources to external storage (e.g. SD card) and call via external storage absolute path
string " Xxx.mp4 ";
2. In the build apk, the video resource is placed in the Streamingassets subdirectory, the video name is called
string " Xxx.mp4 ";
Note that in the UNITY4.6.6F2 version, if the video resource is not placed in the subdirectory of Streamingassets, it is in its secondary directory, for example streamingassets/seconddir/ Xxx.mp4, the following three path parameters do not make the video play successfully
string " Xxx.mp4 ";
string " Seconddir/xxx.mp4 ";
string " jar:file:/// " " !/assets/ " "seconddir/ Xxx.mp4 ";
I did not test in the previous version of UNITY4.6.6F2, but the guess should not be the same, if there are discrepancies, please point out.
So if you want to successfully play the video on the Android platform, you can choose
1. Copy video resources to external storage (e.g. SD card)
2. Place the video resources in the Streamingassets sub-level directory
Unity Handheld.playfullscreenmovie video Playback (Android platform resource Storage path)