protected override void OnEnable()
 {
     base.OnEnable();
     m_ShouldRecalculateClipRects = true;
     ClipperRegistry.Register(this);
     MaskUtilities.Notify2DMaskStateChanged(this);
 }
        protected override void OnValidate()
        {
            base.OnValidate();
            m_ShouldRecalculateClipRects = true;

            if (!IsActive())
            {
                return;
            }

            MaskUtilities.Notify2DMaskStateChanged(this);
        }
 protected override void OnDisable()
 {
     // we call base OnDisable first here
     // as we need to have the IsActive return the
     // correct value when we notify the children
     // that the mask state has changed.
     base.OnDisable();
     m_ClipTargets.Clear();
     m_Clippers.Clear();
     ClipperRegistry.Unregister(this);
     MaskUtilities.Notify2DMaskStateChanged(this);
 }