Unity 6.3からAndroidビルド設定で「Data Location」項目が追加されました。
永続データ領域とテンポラリーなキャッシュ領域に関して、次のどちらかを選択できます。
- 可能ならば外部ストレージに保存させる:「Prefer Exteranal」
- 強制的に端末内部にさせる:「Force Internal」
Player Settings > Android > Other Settings > Configurationに、Data Location項目があります。
Unity 6000.3.b10のリリースノートはこちら。
Android: Added the option to force the use of internal storage for persistent and cache files.
私のPixel 9aの端末における、挙動の例を示します。
Prefer Exteranalだと、
- Application.persistentDataPathは、「
/storage/emulated/0/Android/data/{アプリケーションID}/files」 - Application.temporaryCachePath、「
/storage/emulated/0/Android/data/{アプリケーションID}/cache」
Force Internalだと、
- Application.persistentDataPathは、「
/data/user/0/{アプリケーションID}/files」 - Application.temporaryCachePath、「
/data/user/0/{アプリケーションID}/cache」
