🌍 Unity/Unity ETC Develop
Streaming 폴더에서 스프라이트 불러와서 사용하기 (Application.streamingAssetsPath)
맨텀
2018. 4. 23. 22:10
www 클래스를 사용한다면 생각보다 간편한 부분.
로딩하는데 다소 시간이 걸리는점만 빼면 간편하고 좋다.
1 2 3 4 5 6 | IEnumerator Example() { WWW www1 = new WWW(Application.streamingAssetsPath + "/" + "1.png"); yield return www1; all_image[0] = Sprite.Create(www1.texture, new Rect(0, 0, www1.texture.width, www1.texture.height), new Vector2(0, 0)); } | cs |