75
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

unityでplatformによって取得できるパス

Script

//一時領域のパス
print(Application.temporaryCachePath);
//ストリーミングアセットのパス
print(Application.streamingAssetsPath);
//Unityが利用するデータが保存されるパス
print(Application.dataPath);
//実行中に保存されるファイルがあるパス
print(Application.persistentDataPath);

IOS:

Application.dataPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx.app/Data
Application.streamingAssetsPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx.app/Data/Raw
Application.persistentDataPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Documents
Application.temporaryCachePath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Library/Caches

Android:

Application.dataPath : /data/app/xxx.xxx.xxx.apk
Application.streamingAssetsPath : jar:file:///data/app/xxx.xxx.xxx.apk/!/assets
Application.persistentDataPath : /data/data/xxx.xxx.xxx/files
Application.temporaryCachePath : /data/data/xxx.xxx.xxx/cache

Windows:

Application.dataPath : /Assets
Application.streamingAssetsPath : /Assets/StreamingAssets
Application.persistentDataPath : C:/Users/xxxx/AppData/LocalLow/CompanyName/ProductName
Application.temporaryCachePath : C:/Users/xxxx/AppData/Local/Temp/CompanyName/ProductName

Mac:

Application.dataPath : /Assets
Application.streamingAssetsPath : /Assets/StreamingAssets
Application.persistentDataPath : /Users/xxxx/Library/Caches/CompanyName/Product Name
Application.temporaryCachePath : /var/folders/57/6b4_9w8113x2fsmzx_yhrhvh0000gn/T/CompanyName/Product Name

Windows Web Player:

Application.dataPath : file:///D:/MyGame/WebPlayer(htmlのパス)
Application.streamingAssetsPath :
Application.persistentDataPath :
Application.temporaryCachePath :

終わりに

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
75
Help us understand the problem. What are the problem?