Directory for reading local files on Unity platforms

Source: Internet
Author: User

In Windows, the configuration file is stored in the application. datapath directory. The configuration file is edited and passes the test. Failed to read after publishing as exe. Later, the configuration file will be placed under the generated _ data file and passed.

Of course, I want to release it to other platforms in the future. persistentdatapath is the place where the mobile terminal can save and generate files. It cannot be changed after being packaged in the resource and placed in the application. the China Mobile Terminal in datapath has no access permission. We recommend that you store the files to be modified in the application. persistentdatapath Directory, which is useful for both Android and IOS.
In this way, your file users can see it.

 

Application. Datapath
Unity Editor: <path TP project folder>/assets
Mac PLAYER: <path to player app bundle>/Contents
IPhone PLAYER: <path to player app bundle>/<appname. app>/Data
Win PLAYER: <path to executablename_data folder>
Web player: the absolute URL to the player data file folder (without the actual data file name)

Application. Persistentdatapath

Macro definition
# If unity_iphone
Application. datapath + ''/iPhone /';
# Endif
# If unity_android
Application. datapath + ''/Android /';
# Endif

 

Unity3d game engine IOS Android supports reading and writing Chinese and local files

Directory for reading local files on Unity platforms

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.