Unity3D/Script
[펌] StreamingAssets 폴더 지정하기
blueasa
2016. 11. 10. 18:40
StreamingAssets 폴더는 Platform마다 다르다.
게다가 더 기가막힌게, Application.streamingAssetsPath를 그대로 믿고 사용할 수 없다는 것이다.
게다가 Unity 문서는 지나간 내용을 설명하고 있으며, 잘못된 내용을 설명하고 있다.
http://docs.unity3d.com/kr/current/Manual/StreamingAssets.html
이런~~~~
정답은 아래와 같다.
#if UNITY_EDITOR || UNITY_STANDALONE_WIN
public static readonly string StreamingPath = "file://" + Application.streamingAssetsPath + "/";
#elif UNITY_ANDROID
public static readonly string StreamingPath = Application.streamingAssetsPath + "/";
#elif UNITY_IOS
public static readonly string StreamingPath = "file://" + Application.streamingAssetsPath + "/";
#endif
반응형