Version: 2017.1
public static string persistentDataPath ;

説明

永続的なデータディレクトリのパスを返します(読み取り専用)

値はアプリケーションが実行されている間データを維持して保存することが予想されるディレクトリパスです。iOS と Android をパブリッシュしたとき persistentDataPath はデバイスの public ディレクトリとなります。この場所はアプリケーションの更新ごとにファイルは削除はされません。ですが、ユーザーのアクションに対しては安全ではないことに注意してください。例えば、Android では SD カードを削除すると保存していたデータにアクセスすることはできなくなります。アプリケーションをビルドしたとき GUID はバンドル ID を基にして生成され、persistentDataPath の一部で使用されることに注意してください。もし将来のバージョンで同じバンドル ID を維持した場合、アプリケーションは毎回アップデートしても同じ場所にアクセスしようとします。

Windows Store Apps: Application.persistentDataPath points to %userprofile%\AppData\Local\Packages\<productname>\LocalState.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { print(Application.persistentDataPath); } }

Note: The persistentDataPath on a Mac is written into the user Library folder. (This folder is often hidden.) In recent Unity releases user data is written into ~/Library/Application Support/company name/product name. Older versions of Unity wrote into the ~/Library/Caches folder, or ~/Library/Application Support/unity.company name.product name. These folders are all searched for by Unity. The oldest folder that contains the required data is used for the application.