[Unity] NGUI UITexture Code로 변경

* 방법 1

img.mainTexture = Resources.Load("img/imageName", typeof(Texture2D)) as Texture2D;




* 방법 2


private iEnumerator loadImg()

{

  Texture2D texture = null; 

  string PATH = "Texture/image.jpg"; 

  texture = Resources.Load(PATH,typeof(Texture2D)) as Texture2D;

  img.mainTexture = texture;

}

이 글을 공유하기

댓글(0)

Designed by JB FACTORY