๐ŸŽฎ Unity Study/Unity

[Unity] Unity Data Path

ibelieveinme 2022. 4. 19. 16:59
728x90

์ถœ์ฒ˜: https://3dmpengines.tistory.com/1745


ํ”Œ๋žซํผ ๋ณ„๋กœ Application ํด๋ž˜์Šค์˜ Property๋“ค์ด ์ง€์ •ํ•˜๋Š” ๊ฒฝ๋กœ์™€ Access ์ •๋„๊ฐ€ ๋‹ค๋ฅด๋‹ค.

 

[๋งฅ ์—๋””ํ„ฐ]
1) Application.persistentDataPath : ์‚ฌ์šฉ์ž๋””๋ ‰ํ† ๋ฆฌ/Library/Caches/unity.ํšŒ์‚ฌ์ด๋ฆ„.ํ”„๋กœ๋•ํŠธ์ด๋ฆ„ (ํŒŒ์ผ ์ฝ๊ธฐ ์“ฐ๊ธฐ ๊ฐ€๋Šฅ)
2) Application.dataPath : ํ”„๋กœ์ ํŠธ๋””๋ ‰ํ† ๋ฆฌ/Assets
3) Application.streamingAssetsPath : ํ”„๋กœ์ ํŠธ๋””๋ ‰ํ† ๋ฆฌ/Assets/StreamingAssets (ํŒŒ์ผ ์ฝ๊ธฐ ์“ฐ๊ธฐ ๊ฐ€๋Šฅ)

 

[๋งฅ ์‘์šฉํ”„๋กœ๊ทธ๋žจ]
1) Application.persistentDataPath : ์‚ฌ์šฉ์ž๋””๋ ‰ํ† ๋ฆฌ/Library/Caches/unity.ํšŒ์‚ฌ์ด๋ฆ„.ํ”„๋กœ๋•ํŠธ์ด๋ฆ„ (ํŒŒ์ผ ์ฝ๊ธฐ ์“ฐ๊ธฐ ๊ฐ€๋Šฅ)
2) Application.dataPath : ์‹คํ–‰ํŒŒ์ผ.app/Contents
3) Application.streamingAssetsPath : ์‹คํ–‰ํŒŒ์ผ.app/Contents/Data/StreamingAssets (ํŒŒ์ผ ์ฝ๊ธฐ ์“ฐ๊ธฐ ๊ฐ€๋Šฅ)

 

[์•ˆ๋“œ๋กœ์ด๋“œ External]
1) Application.persistentDataPath : /mnt/sdcard/Android/data/๋ฒˆ๋“ค์ด๋ฆ„/files (ํŒŒ์ผ ์ฝ๊ธฐ ์“ฐ๊ธฐ ๊ฐ€๋Šฅ)
2) Application.dataPath : /data/app/๋ฒˆ๋“ค์ด๋ฆ„-๋ฒˆํ˜ธ.apk
3) Application.streamingAssetsPath : jar:file:///data/app/๋ฒˆ๋“ค์ด๋ฆ„.apk!/assets (ํŒŒ์ผ์ด ์•„๋‹Œ WWW๋กœ ์ฝ๊ธฐ ๊ฐ€๋Šฅ)
 
[์•ˆ๋“œ๋กœ์ด๋“œ Internal] 
1) Application.persistentDataPath : /data/data/๋ฒˆ๋“ค์ด๋ฆ„/files/ (ํŒŒ์ผ ์ฝ๊ธฐ ์“ฐ๊ธฐ ๊ฐ€๋Šฅ)

2) Application.dataPath : /data/app/๋ฒˆ๋“ค์ด๋ฆ„-๋ฒˆํ˜ธ.apk

3) Application.streamingAssetsPath : jar:file:///data/app/๋ฒˆ๋“ค์ด๋ฆ„.apk!/assets (ํŒŒ์ผ์ด ์•„๋‹Œ WWW๋กœ ์ฝ๊ธฐ ๊ฐ€๋Šฅ)

 

[iOS]
1) Application.persistentDataPath : /var/mobile/Applications/ํ”„๋กœ๊ทธ๋žจID/Documents  (ํŒŒ์ผ ์ฝ๊ธฐ ์“ฐ๊ธฐ ๊ฐ€๋Šฅ)

2) Application.dataPath : /var/mobile/Applications/ํ”„๋กœ๊ทธ๋žจID/์•ฑ์ด๋ฆ„.app/Data

3) Application.streamingAssetsPath : /var/mobile/Applications/ํ”„๋กœ๊ทธ๋žจID/์•ฑ์ด๋ฆ„.app/Data/Raw (ํŒŒ์ผ ์ฝ๊ธฐ ๊ฐ€๋Šฅ, ์“ฐ๊ธฐ ๋ถˆ๊ฐ€๋Šฅ)

 

728x90