Posts 유니티 - 플랫폼별 경로들
Post
Cancel

유니티 - 플랫폼별 경로들

경로 파라미터


  • <projectroot> : 유니티 에디터 프로젝트 폴더 루트 경로
  • <executablefolder> : 빌드된 실행 파일의 폴더 경로
  • <companyname> : Project Settings - Player에서 지정한 Company Name
  • <productname> : Project Settings - Player에서 지정한 Product Name
  • <packagename> : com.<companyname>.<productname>


읽기, 쓰기 모두 가능한 경로


Windows Editor

1
2
Application.dataPath
"<projectroot>/Assets"
1
2
Application.persistentDataPath
"%userprofile%/AppData/LocalLow/<companyname>/<productname>"
1
2
Application.streamingAssetsPath
"<projectroot>/Assets/StreamingAssets"


Windows Standalone

1
2
Application.dataPath
"<executablefolder>/<productname>_Data"
1
2
Application.persistentDataPath
"%userprofile%/AppData/LocalLow/<companyname>/<productname>"
1
2
Application.streamingAssetsPath
"<executablefolder>/<productname>_Data/StreamingAssets"


Android

1
2
3
4
5
6
7
Application.persistentDataPath

/* 외부 저장소 */
"/storage/emulated/0/Android/data/<packagename>/files"

/* 내부 저장소 */
"/data/data/<packagename>/files"
1
2
3
$"/storage/emulated/0/DCIM/{Application.productName}"
// => 스크린샷을 저장할 때 사용되는 경로
// => 읽기/쓰기는 가능하나, 이미 존재하는 파일에 덮어쓰기는 안된다.


IOS

1
2
Application.persistentDataPath
"/var/mobile/Applications/programID/Documents"


읽기 전용 경로


Android

1
2
3
4
Application.dataPath

/* 외부 저장소, 내부 저장소 */
"/data/app/<packagename>-NUMBER.apk"
1
2
3
4
Application.streamingAssetsPath

/* 외부 저장소, 내부 저장소 */
"jar:file:///data/app/<packagename>.apk!/assets"


IOS

1
2
Application.persistentDataPath
"/var/mobile/Applications/programID/Documents"


WebGL

  • 모두 애셋 번들 사용


References


This post is licensed under CC BY 4.0 by the author.