I have a SlateBrush image of a character, and bellow a bar with the characters’s health bar.
I am basing the health bar on StrategyGame health bars, so I have tried using the FCanvasTileItem too, but it’s rendered below the character image.
Any idea what I can do to make the FCanvasTileItem render over the SlateBrush?
I encountered this issue of Slate always rendering on top of Canvas stuff as well
my only solution was to move everything over to Slate
Then check out GameViewportClient.h, you can specify the order of Slate widgets when attaching them to the viewport!
/**
* Adds a widget to the Slate viewport's overlay (i.e for in game UI or tools) at the specified Z-order
*
* @param ViewportContent The widget to add. Must be valid.
* @param ZOrder The Z-order index for this widget. Larger values will cause the widget to appear on top of widgets with lower values.
*/
void AddViewportWidgetContent( TSharedRef<class SWidget> ViewportContent, const int32 ZOrder = 0 );