0
点赞
收藏
分享

微信扫一扫

Unity实现byte[]合成图像

孟佳 2022-07-27 阅读 61

bool CreateCovers(byte[] imageData)
{
Texture2D imageTexture = new Texture2D(273, 126);
imageTexture.LoadImage(imageData);
imageTexture.Apply();

return ExceptionHandler.Assert(() =>
{
Image cover = Instantiate(childUI) as Image;
cover.material.mainTexture = imageTexture;
});
}



举报

相关推荐

0 条评论