Paths in the application

Source: Internet
Author: User

Premise

Project Project Catalog: e:/work/cosmosbox/cb-client/

My computer's current user name: Qingqing

Persistentdatapath

Application.persistentdatapath Persistent Data path, this data example is not deleted when the app is updated : c:/users/qingqing/appdata/locallow/cosmosbox/

The last directory name is the CompanyName set in Playersettings

The Windows platform may have other problems because the user name is non-English note, can be set to Xxx/library/unitywinpersistentdatapath

 Public Static stringGetappdatapath () {//use a specific directory for Windows to avoid the presence of the Chinese user    if(Application.platform = = Runtimeplatform.windowseditor | | Application.platform = = Runtimeplatform.windowsplayer | | Application.platform = =runtimeplatform.windowswebplayer) {stringDataPath = Application.datapath +"/.. /library/unitywinpersistentdatapath"; if(!directory.exists (DataPath))        Directory.CreateDirectory (DataPath); returnDataPath; }    returnApplication.persistentdatapath;}
Details: Http://wiki.ceeger.com/script:unityengine:classes:application:application.persistentdatapath

DataPath

Application.datapath Data path (Assets directory) Example: E:/work/cosmosbox/cb-client/assets

Details: http://wiki.ceeger.com/script:unityengine:classes:application:application.datapath?s[]=application

Streamingassetspath

Application.streamingassetspath (assets/streamingassets directory), assetbundle generally stored in this directory, can be read by the WWW example: e:/work/ Cosmosbox/cb-client/assets/streamingassets

Android:jar:file://+application.datapath+string.format ("!/assets/{0}/", Resourcedirname)

Unity editor:file:///

Details: Http://wiki.ceeger.com/script:unityengine:classes:application:application.streamingassetspath

Temporarycachepath

Temporary cache directory for Application.temporarycachepath operating system, example: z:/temp/cosmosbox/[My Computer sets the cache file to Z disk]

Details: http://wiki.ceeger.com/script:unityengine:classes:application:application.temporarycachepath?s[]= Application

Paths in the application

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.