How did they make rounded clipdescendants?

So it is widely known that clipdescendants does not work with rounded corners but recently I stumbled upon a game that somehow achieved this in a progress bar with seemingly not catch.

Here is an image of the progress bar.

As you can see the progression is cutoff perfectly like rounded clipdescendants exists.
I am very curious how the developers of this game managed to achieve this.

For anyone wondering the game is called “Clicker Mining Simulator”.

If you know or have any clue on how they achieved this then let me know!

3 Likes

You could in theory use a CanvasGroup to accomplish this. However using it creates new textures for each time the scale of the UI element is changed and as such it might not be the best performance-wise.

1 Like

well I prefer not to use canvasgroup. Is there not any other way to achieve this?

1 Like

Sorry for the late response, I don’t check DevForum very frequently unless mandatory. Anyway, you could manipulate the GUI by making the bar go behind the frame and outside of your GUI’s border with ClipDescendants on, I hope this helps you!

1 Like

Sadly the only way to achieve this sort of effect is by using only canvas groups, however you could technically get something “theoretically” similar if you were to use a visually matching set of UICorner instances on both the parent ui and child ui. This method wont look as great primarily when the progress bar itself is too small but could still help, i think?

2 Likes