Unity实现byte[]合成图像

    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;
        });
    }

猜你喜欢

转载自www.cnblogs.com/ezhar/p/12924151.html
今日推荐