- Home /
Trouble with UI Mask
Hi guys - first time using UI Masks. I've setup a Mask as a child of my Canvas in world space. The children of the Mask are RawImages which I slide through the mask. When I run the game, none of the children render at all. If I go in the hierarchy view and toggle the "Show Mask Graphic" checkbox on the Mask component, it starts working and continues working after that point.
Toggling the same variable from c# doesn't seem to have the same result; none of the children render until I manually toggle that value from the editor.
Are there particular material requirements for the mask or the children? I'm using a plain material with the Default UI shader type, but had the same results when specifying no material at all.
Is there any special "sync" function I can call on the mask to force it to re-render as it does when I tweak its values from the editor?
Thanks for any insight.
Note: looks like toggling the $$anonymous$$ask's .enabled flag from the editor (not from code) also wakes it up and starts rendering the children. Unity version 5.3.5f1 Personal.
Your answer
Follow this Question
Related Questions
Check if visible in UI Mask 2 Answers
UI/Default stencil buffer for only parent? 0 Answers
Using UI Text as as mask for an underlying image 2 Answers
UI Mask Component doesn't work for me. 1 Answer
Unity UI image + mask has jaggies 2 Answers