untiy3d base64 To texture2d(unity3dbase64字符串数据转换图片

2019-04-15 18:50发布

//base64位字符串数据转换texture2dprivate Texture2D Base64ToTexter2d(string Base64STR) { Texture2D pic = new Texture2D(200,200); byte[] data = System.Convert.FromBase64String (Base64STR); pic.LoadImage(data); return pic; }