CMinimapWidget

UCMinimapWidget visual layout UCMinimapWidget visual layout

Overview

UCMinimapWidget displays a minimap driven by a UTextureRenderTarget2D and a dynamic material instance. The render target is created at runtime (256x256, RGBA8) and assigned to a material parameter, which is then applied to a UImage widget via FSlateBrush.

Other systems can access the render target through the ICMinimapWidget_::currentMinimapData interface to render scene captures into it.

Functions

Name Description
consume Initializes the widget: creates the render target, creates the dynamic material instance and sets the image brush
currentMinimapData Returns the render target pointer for external systems to render into
// UCMinimapWidget receives data via consume:
// - object: source actor

// A UTextureRenderTarget2D is created at runtime (256x256, RTF_RGBA8).
// A UMaterialInstanceDynamic is created from MAT_CdryxMinimap,
// with the render target assigned to the "cdryxMinimapRenderTarget" parameter.
// The dynamic material is set as the brush resource on CReservedKeyword_minimap_Image.

// External systems call currentMinimapData to get the render target and render into it.