Can a Dynamic Texture Object be referenced in a Material?

Hi,

I am wanting to reference a UTexture within a Material and am unsure of the best method of accessing the texture.

Is there a way to reference from the Actor that contains the RenderTargets array, or would updating a Material Parameter collection from within the actor be the best course action?

Thank you,
Kevin

261523-code.png

Got it by adding a Texture Object parameter to the material!

.h

UMaterialInstanceDynamic* DynamicMaterial;

.cpp

DynamicMaterial = UMaterialInstanceDynamic::Create(StoredMaterial, MeshComponent);
DynamicMaterial->SetTextureParameterValue(FName(TEXT("RT")), RenderTargets[0]);