I’m pretty sure you can in fact use 9 Slice for this.
Here, you can see how a 9 slice functions. In your case you can have the line subdiving the top chunks to be under your light part, which should result in it not being scaled with everything else.
Hi! Thanks for your reply! I did read this and it was confusing still. Could you possibly use a drawing tool on the second image I sent you to show me how you think I should have the slice setup to see it it’ll make me understand a bit better?
This is pretty much how the setup should look like, as you can see the top line is below the lighter area of your image, which means it won’t be scaled vertically.
Doesn’t having a lot of Canvas Groups use more memory? Most of my UI in the game will have this design and some how I’m also thinking about making a invert colors of this design or a light mode using this design.
Would it be more performant using canvas groups or having 2 separate images the top 2 corners rounded and the bottom sharp corners and coloring them separately?
it won’t break it’s only suggesting you use canvasgroup if you’re not going to change it’s size since that would create extra textures which would impact performance
We recommend using CanvasGroup with static sizes, otherwise a new texture would need to be created to accommodate new sizes.
I’m having text scaling problems + images and texts go blurry using canvas group + Using UICorner not looking good when scaling. Any ideas how to fix? The one on the left is Frames + Images as the background and on the right is the canvas group. Edit: I might of fixed it.
If you’re still going for 9 Slices, you might wanna look after the SliceScale property which as its name, scales the slices.
What is SliceScale
Since 9 slices would ignore or limit some regions to certain scaling as seen in the image above, if we let’s say want to make the corner look smaller we would need to use the SliceScale Property.
Above is an example of 9 slices ImageLabels with different slice scales.
The problem with SliceScale is that isn’t responsive or scales with the screen size, that’s why when you use a smaller screen the topbar still looks big. I’ve read a post that tries to make it dynamically sized though I haven’t tried them personally. But it’s something to look for.