Unity3d file Read

Source: Internet
Author: User

Resources:

Appears as a unity3d folder, that is, if you create a new folder named Resources, the contents of the package will be unconditionally hit in the release package. The characteristics of this simple summary is:

    1. Read-only, which cannot be modified dynamically. So the resources you want to dynamically update are not put here.
    2. Packages the resources within the folder into the . Asset file. Therefore, it is recommended to put some Prefab, because Prefab will automatically filter out unwanted resources when packaging, which is helpful to reduce the size of the resource bundle.
    3. Mainline preempted.
    4. Resource reads using resources.load ().
streamingassets:

To talk about streamingassets, in fact, and Resources are quite similar. Same as a read-only Unity3d of the reserved folder appears. There is a big difference, though, that the content in the Resources folder is compressed and encrypted when it is packaged. the contents of the streamingasset folder are then entered into the package intact, so streamingassets is primarily used to store some binary files. Here's a simple summary:

    1. Similarly, read-only is not writable.
    2. It is used primarily to store binaries.
    3. Only the WWW class can be used to read.
assetbundle:

about assetbundle There are already a lot of introductions. In short, the prefab Span style= "Font-family:verdana" >assetbundle file (also a binary). But there is also a mishap, that is, the mobile side can not update the script. The following is a brief summary:

    1. is a binary type defined by Unity3d.
    2. It's best to encapsulate the prefab into aseetbundle, but it's not the only way to say that the script can't be updated on the mobile? is the script on the Prefab that got from assetbundle not going to work? Not necessarily, as long as this prefab on the local script, you can.
    3. Use the WWW class to download.
persistentdatapath:

It looks like it's just a path, but why take it out of the path and introduce it separately? Because it is really special, this path is readable and writable. And in ios is the application sandbox,  but in android can be a sandbox for the program, or it can be sdcard android when packaged, projectsetting page has an option write access sdcard

    1. Content can be read and written, but only run to write or read. It is not feasible to store data in this path in advance.
    2. No content restrictions. You can read a binary file from streamingasset or read a file from Assetbundle to write to Persistentdatapath .
    3. Write down the files that can be viewed on the computer. can also be cleared away.

Unity3d file Read

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.