I can attest to this bug... in my project, the only workaround I found was when an item is updated and I expect him to be out of the mask I would create a clone of it and delete the old one
This was fixed the other day. It should be in an upcoming fix but if you want it now you can download the UI source code and apply this change: Code (CSharp): diff --git a/Extensions/guisystem/UnityEngine.UI/UI/Core/MaskableGraphic.cs b/Extensions/guisystem/UnityEngine.UI/UI/Core/MaskableGraphic.cs --- a/Extensions/guisystem/UnityEngine.UI/UI/Core/MaskableGraphic.cs +++ b/Extensions/guisystem/UnityEngine.UI/UI/Core/MaskableGraphic.cs @@ -91,6 +91,11 @@ namespace UnityEngine.UI return; var cull = !validRect || !clipRect.Overlaps(canvasRect, true); + UpdateCull(cull); + } + + private void UpdateCull(bool cull) + { var cullingChanged = canvasRenderer.cull != cull; canvasRenderer.cull = cull; @@ -196,7 +201,10 @@ namespace UnityEngine.UI var newParent = (maskable && IsActive()) ? MaskUtilities.GetRectMaskForClippable(this) : null; if (newParent != m_ParentMask && m_ParentMask != null) + { m_ParentMask.RemoveClippable(this); + UpdateCull(false); + } if (newParent != null) newParent.AddClippable(this);
Awesome Both the fix and the "way less horrible" workaround I'm updating my code with this workaround and wait for the patch to hit Unity as I cannot use the source code (company GIT and so on... :/ )
@karl_jones Just found this thread and I have a similar issue. Using Mask works for me but using RectMask2D doesn't work in Play Mode for some reason. Basically set the scene up so UI elements aren't visible from the Mask. Then enter Play Mode and modify the RectMask2D Rect Transform so they become visible (I modified the size), but they don't show up. They remain culled I guess? Anyway just wanted to tell you about it. I'm using 5.5.0f3 btw.
The original bug was fixed last year. It sounds like you have found something new. Can you file a bug report please?