Question by
WarOnGravity · Feb 08, 2020 at 06:49 PM ·
uitextcanvasrender order
UI Mask for List VS Canvas for Text
I have buttons that I'd like an icon and some text on. Like this: If I use a canvas on the button, I can make the text appear on top of the icon's sprite... but then it overrides my viewport's mask.
Here's a diagram of my hierarchy:
1)GUI (canvas)
2)Image w/ScrollRect
3)Image w/Mask as Viewport
4)Image w/ContentSizeFitter
5)Button Prefabs (genereated at runtime)
5.1)Canvas for Text to display on top of Spite (to use "Override Sort Order")
6.1) Text1
6.2) Text2
5.2)Image as Icon on Button
Example of problem: The areas marked in red should be masked, like the button's white and spites.
Any help is tremendously appreciated! Tom G.
capture.png
(6.1 kB)
2.png
(78.1 kB)
Comment