Hello !
I have the following (sliced) sprite :

I use the sprite (not the texture) in UI Builder :

The arrow keeps the same width when resized horizontally, as expected :

However, the arrow is deformed along its height when resized vertically :

I can see cases where this is useful and expected, but it does not suit my case 
I cannot put my finger on what I’m doing wrong, if I am not implementing this correctly, or if there’s a bug. ^^"
Does anyone have an idea ? (how to implement this correctly, how to workaround the issue…)
The way 9-slices work is that the left/top/right/bottom part of the 9-slices will keep their relative sizes while the center part will stretch.
In your example, since there are no top/bottom slices, it’s all part of the center, which is stretchable.
I’m not sure what is the expected behavior here, so I can’t provide a workaround. Can you please provide more details about what you would expect to happen when you stretch vertically?
Sorry for my confusion : there was indeed no way my use case would be solved by 9-slicing ^^"
I would like the end of the arrow to not stretch vertically.
This would mean that this VE (outer end of the arrow in red)…

… would look this way when stretched vertically…

instead of this :

I’m unsure what would be the best way to implement this in the builder 
(e.g. separate the outer end of the arrow and do something so it can preserve its aspect ratio ?)
Yes, I think using multiple VisualElements here is the way to go. You can probably assemble them in a common parent, and with the proper flex values, you can probably make it behave the way you want.
1 Like