Unity Handheld.playfullscreenmovie video Playback (Android platform resource Storage path)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.