- Home /
How would you mask a UI canvas like you would mask a sprite?
I need to mask a background that has a changeable text. I need to mask it with multiple individually moving masks. The attached image is an example of what I'm talking about. It would be easy to do if I had an image of the background and then use sprite renderers and sprite masks, but the problem is that I need to use a canvas as the background because the background needs to be a changeable text.
The problem is that the UI masking works by making the mask object the parent of the masked objects. Since my masked object is the background with the text, that would mean that I would need multiple backgrounds and that is inefficient because I need a lot of these masks.
The only solution that I can think of is take a screenshot of the background canvas with a camera and make that a sprite. But that also seems inefficient since the text will change frequently (aprox. every 5 mins in the game) and I would need to take a lot of screenshots. Is there an easier way?
Your answer
Follow this Question
Related Questions
Can I combine 2 or more UI masks? 0 Answers
Mask Sprites 1 Answer
uGUI Mask Content 0 Answers
UI masking on nested canvas with overwrite sorting layer. 1 Answer
How to get masked sprite? 1 Answer