protected override void OnEnable()
 {
     base.OnEnable();
     m_ShouldRecalculateClipRects = true;
     ClipperRegistry.Register(this);
     MaskUtilities.Notify2DMaskStateChanged(this);
 }
 static public int Cull(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.UI.ClipperRegistry self = (UnityEngine.UI.ClipperRegistry)checkSelf(l);
         self.Cull();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
示例#3
0
 protected override void OnDisable()
 {
     base.OnDisable();
     this.m_ClipTargets.Clear();
     this.m_Clippers.Clear();
     ClipperRegistry.Unregister(this);
     MaskUtilities.Notify2DMaskStateChanged(this);
 }
示例#4
0
 static public int Cull(IntPtr l)
 {
     try {
         UnityEngine.UI.ClipperRegistry self = (UnityEngine.UI.ClipperRegistry)checkSelf(l);
         self.Cull();
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 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);
 }
示例#6
0
 protected override void OnDestroy()
 {
     ClipperRegistry.Unregister(this);
     base.OnDestroy();
 }