How to Canvas over SlateBrush?

Hi,

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?

Thanks

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 );

#Adding widget to viewport

SAssignNew(VictoryInputText,SVictoryInputText, Cast<AVictoryHUDElements>(this));
GEngine->GameViewport->AddViewportWidgetContent(
		SNew(SWeakWidget)
		.PossiblyNullContent(VictoryInputText.ToSharedRef()),
                2000 //z priority very high!
	);

:wink:

Rama

This in HUD.h did it (using UE4.6.1)

/** 'Foreground' debug canvas, will draw in front of Slate UI. */
UPROPERTY()
UCanvas* DebugCanvas;

You can not access it from the outside and there are no function to use it like DrawText.