Unity3D Texture2D
作者:
UnityAsk | 来源:发表于
2016-07-28 20:08 被阅读235次 Color32[] colors = new Color32[4];
colors [0] = Color.red;
colors [1] = Color.black;
colors [2] = Color.blue;
colors [3] = Color.green;
texture = new Texture2D (2,2,TextureFormat.RGBA32,false);
texture.SetPixels32 (colors);
texture.Apply ();
byte[] bytes = texture.EncodeToPNG ();
File.WriteAllBytes (Application.dataPath+"/tttt.png",bytes);

屏幕快照 2016-07-28 下午8.07.33.png
本文标题:Unity3D Texture2D
本文链接:https://www.haomeiwen.com/subject/eegajttx.html
网友评论