Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to Canvas over SlateBrush?


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?


Product Version: Not Selected
more ▼

asked Jul 01 '14 at 06:42 PM in C++ Programming

avatar image

86 11 8 13

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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

 /** 'Foreground' debug canvas, will draw in front of Slate UI. */
 UCanvas* DebugCanvas;
more ▼

answered Jan 28 '15 at 07:51 AM

avatar image

86 11 8 13

avatar image ellocator Nov 06 '17 at 10:31 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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));
                 2000 //z priority very high!



more ▼

answered Jul 03 '14 at 02:08 PM

avatar image

10.6k 446 346 1088

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question