前言
实现
内存纹理创建
完整的源文件见下:
#include "CreateDynamicTexture.h"
UTexture2D * UCreateDynamicTexture::CreateDynamicTexture(int Width, int Height)
{
int32 TextureWidth = Width;
int32 TextureHeight = Height;
UTexture2D *NewTexture = UTexture2D::CreateTransient(TextureWidth, TextureHeight, PF_B8G8R8A8, FName("MyColorMap"));
return NewTexture;
}