How can i get nice unstreatched borders in UMG

9-Slice. Scroll down to Setting Image States:

Example:


The material is drawn as a box with margins set to zero. However, no matter how I’m configuring the margin and the draw-as, I can’t get it to look good on smaller buttons:

Can you show how it’s set up, and what are the sizes we’re talking about? The thing is that 9-slice only works up, you want to design the smallest possible UI elements first, and only then stretch them, preserving edges / corners intact.


Material responds to Image Size, it might be as straightforward as reducing its size on the ButtonMaterial. Then margins work like percentage in the 0-1 range, counting from each edge.

  • size set to 32 (smaller or equal to the px size of this element):

  • and size being too large for this element:

This confused the margin as it now counts 40% of the 128 in pixels.