본문 바로가기
개발/Unity

Unity) 플랫폼별 경로 (Platform Path)

by 테샤르 2023. 3. 7.

 플랫폼별 경로 (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

 

★☆☆☆☆

 

반응형

댓글