플랫폼별 경로 (Platform Path)
Application.persistentDataPath
(읽기 전용) 영구 데이터 디렉터리에 대한 경로를 포함합니다.
Android | /* 외부 저장소 */ "/storage/emulated/0/Android/data/<packagename>/files" /* 내부 저장소 */ "/data/data/<packagename>/files" |
Mac | Users/<username>/Library/Application Support/com.yourcompany.yourapp |
Standalone / Editor | "%userprofile%/AppData/LocalLow/<companyname>/<productname>" |
iOS | "/var/mobile/Applications/programID/Documents" /var/mobile/Containers/Data/Application/3F75CABA-2B92-48B2-B06F-9F9F0D84492D/Documents |
Application.dataPath
대상 장치의 게임 데이터 폴더 경로를 포함합니다(읽기 전용).
Android | /* 외부 저장소, 내부 저장소 */ "/data/app/<packagename>.apk" |
Mac | Users/<username>/Library/Containers/com.yourcompany.yourapp/Data/Resources |
Standalone / Editor | "<executablefolder>/<productname>_Data" |
iOS | /var/mobile/Containers/Data/Application/3F75CABA-2B92-48B2-B06F-9F9F0D84492D/Documents |
Application.streamingAssetsPath
빌드된 어플리케이션에서는 이 주소에서 자산을 로드할수 있다.
WebGL, Android 에서는 불가능하다. (읽기 전용).
Android | file:///data/app/%BundleIdentifier%.apk/!/assets |
Mac | <your-app-bundle>/Contents/Resources/Data/StreamingAssets/ |
Standalone / Editor | "<executablefolder>/<productname>_Data/StreamingAssets" |
iOS | <your-app-bundle>/Data/Raw/ |
Application.temporaryCachePath
임시 데이터/캐시 디렉토리에 대한 경로를 포함합니다(읽기 전용).
Android | file:///android_asset/ |
Mac | /Users/<username>/Library/Caches/Unity |
Standalone / Editor | C:\Users\<username>\AppData\Local\Unity\cache |
iOS | <your-app-bundle>/Contents/Resources/Data/StreamingAssets/ |
데이터의 위치 및 속성에 따라 저장소에 대해서 다르게 설정해줘야 한다.
Unity - Application.persistentDataPath : [링크]
Unity - Scripting API: Application.persistentDataPath
This value is a directory path where you can store data that you want to retain between runs. When you publish on iOS and Android, persistentDataPath points to a public directory on the device. The files can only be erased by users directly and not by any
docs.unity3d.com
Unity - Application.dataPath : [링크]
Unity - Scripting API: Application.dataPath
The value depends on which platform you are running on: Unity Editor: <path to project folder>/Assets Mac player: <path to player app bundle>/Contents iOS player: <path to player app bundle>/<AppName.app>/Data (this folder is read only, use Application.per
docs.unity3d.com
Unity - Application.streamingAssetsPath : [링크]
Unity - Scripting API: Application.streamingAssetsPath
Use the StreamingAssets folder to store assets. At runtime, Application.streamingAssetsPath provides the path to the folder. Add the asset name to Application.streamingAssetsPath. The built application can load the asset at this address. You can use the De
docs.unity3d.com
★☆☆☆☆
'개발 > Unity' 카테고리의 다른 글
Unity) 유니티 모범 사례 (Unity -Bset Practies) (0) | 2023.03.31 |
---|---|
문제해결)ERROR: UnityException: Can not sign the application (1) | 2023.03.23 |
Unity)EDM4U - Dependencies.xml 종속성 관리(Android / iOS) (0) | 2023.02.28 |
문제해결)Unity)File.Delete 안되는 경우 (0) | 2023.02.13 |
Unity) 빌드 정보:Build Report (빌드 후 -Texture, Meshes,Animation, Sound, Script 용량,압축 정보 등등) (0) | 2023.01.31 |
댓글