Unity3D动态加载图片 动态加载texture2D
//动态加载图片
IEnumerator loadImage()
{
WWW www = new WWW("http://u3dchina.com/template/singcere_dw/common/images/logo.png");
yield return www;
txt2d = new Texture2D(4, 4, TextureFormat.DXT1, false);
www.LoadImageIntoTexture(txt2d);//Resources.LoadAssetAtPath("http://u3dchina.com/template/singcere_dw/common/images/logo.png", typeof(Texture)) as Texture;
GameObject.Find("Game1BG").GetComponent<UITexture>().mainTexture = txt2d;
}
{:5_424:}{:5_424:}{:5_424:}{:5_424:}不错 很不错 顶顶多好 真心顶 难得一见的好帖 很好哦 好帖就是要顶 顶顶多好 真心顶
页:
[1]