9 Slice Sprite Not Drawing Correctly

Hello,

I was wondering if someone would be able to help me with an issue I am having of 9 Slice Sprites not drawing correctly in Playcanvas. I have used 9 sliced sprites quite often in other programs and expected them to work the same in Playcanvas, but perhaps I am just doing something wrong?

This is how the sprite is imported from TexturePacker using the Playcanvas settings.

I would expect that nice round top and bottom to be preserved based on the borders given.

However, the sprite draws like this in my scroll bar.
Screen Shot 2021-05-17 at 8.32.48 PM

With strange points on the top and bottom.

Any help would be greatly appreciated!

Thanks,
Justin

Hi @justinISO,

When selecting the sprite asset what is the selected render mode and resolution?

Check the different render modes here and what to expect: https://developer.playcanvas.com/en/user-manual/2D/9-slicing/#tiled-sprites

That looks like it is rendering correctly given the width of the scrollbar. If the width is that small, the middle of the 9 slice is basically 0 and it’s just the two sides being put together with no middle.

1 Like

Ahhh that was the ticket! We have been exporting assets “@2x” and didn’t consider how that would affect 9 slicing! Thank you so much for your help!

1 Like