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?

Hello @cosic196 ,

Could you find any solution for this? This is what I am trying to do now.

If you solved it, please let me know how to do that.

Thank you.

Best Wishes!