How could I set up a health bar in the HUD which can be resized in Blueprints without stretching?

Hi there,

I’m looking to set up some health bars in my HUD which I can resize in blueprint without stretching.
I know I can use Draw Rect to draw a filled rectangle, but I want to draw just the edge lines of the rectangle.

I tried using Draw Line to just draw the 4 lines, and that almost works however for some reason the lines are 2px thick. (Not what I want)

I could draw the rectangle lines as a texture, but then if I resized the box in the code/blueprint with the same texture the lines would stretch in width, which I want to avoid.

I have used UI tools in the past that can conveniently slice textures so that they can be resized easily, like this:

(Black lines to visualize the slices)


I’m not sure if there’s a term for that.

Is anything like this possible in UE? Or do I have to manually draw each area of the texture?

I achieved my goal by drawing 4 Rects. (One as each line)

I’d still like to know if there are any features like this though.

FYI: In Adobe Flash (the previous implementation of UIs via Scaleform), this was called “9-Slice Scaling.”

Unfortunately, this isn’t something we support in blueprints at this time. We do support it in code with Slate, specifically with the SBoxBrush function. We won’t have this support for blueprints until we release Unreal Motion Graphics (UMG) in the future. UMG was discussed in our recent live stream which you can find on