Analysis of advanced Streaming media resources of Unity3d technology

Source: Internet
Author: User

Welcome to Unity Learning, unity training, Unity Enterprise training and education zone, there are many u3d resources, u3d training videos, u3d tutorials, U3d Frequently asked questions, U3d Project source code, we are committed to creating the industry Unity3d training, learning the first brand.

Streaming Media Resources

Most of Unity's resources are integrated into the project when it is built. However, placing files on the target machine to the normal file system can be accessed through the pathname, which can be a useful feature. One such example is the deployment of an IOS device movie file, where the original movie file must be accessible somewhere in the file system to play the movie using the Playmovie function.

In a Unity project, all files placed within the streaming media resources (streamingassets) folder are copied to the specific folder of the target machine, individually. On desktop computers (Mac OS or Windows), the location of these files can be obtained through the following code:

Path = = Application.datapath + "/streamingassets";

IOS should use the following:

Path = Application.datapath + "/raw";

And for Android, you should use:

Path = "jar:file://" + Application.datapath + "!/assets/";

Note that on Android devices, all of the above files are contained in a. jar compressed file (basically the same format as the standard ZIP archive). This means that if you do not use Unity's WWW class to retrieve files, you need to use other software to view the. jar archive and get the file.

For more highlights, please click http://www.gopedu.com/

Analysis of advanced Streaming media resources of Unity3d technology

Related Article

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.