UE4 Scripted Texture?

Dear Friends at Epic,

Do you have any estimate on a UE4 Scripted Texture?

And to the community,

does anyone already have a way of doing this using current UE4 classes?



I’d imagine it would be possible to do using a Slate based widget… I just don’t know how :stuck_out_tongue:

Curious about this myself now.

Great to hear from you! :slight_smile:



Hi Rama,

Scripted Textures were just an UnrealScript interface for C++ Render Targets - they haven’t gone anywhere, just this interface is no longer required.

Take a look at the sample code I posted in this thread:

Hopefully that should help you get started!


This is awesome!

Thanks Luke!

#Luke’s Code

I am reposting your code here for others faster reference

// Create a Render Texture and initialise it.
RenderTexture = CastChecked(StaticConstructObject(UTextureRenderTarget2D::StaticClass()));
RenderTexture->ClearColor = FLinearColor::Black;
RenderTexture->InitAutoFormat(RenderTargetRes, RenderTargetRes);

// Create a Canvas and assign the render texture resource to it
FTextureRenderTarget2DResource* TextureResource = (FTextureRenderTarget2DResource*)RenderTexture->Resource;
Canvas = new FCanvas(TextureResource, NULL, 0, 0, 0);

//Your drawing code goes here

//Assign render texture to material
MyMaterial->SetTextureParameterValue(TEXT("Target"), RenderTexture);