UnTrackGraphic() public static method

public static UnTrackGraphic ( Graphic g ) : void
g Graphic
return void
示例#1
0
 protected override void OnDisable()
 {
     GraphicRebuildTracker.UnTrackGraphic(this);
     GraphicRegistry.UnregisterGraphicForCanvas(this.canvas, this);
     CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);
     if (this.canvasRenderer != null)
     {
         this.canvasRenderer.Clear();
     }
     LayoutRebuilder.MarkLayoutForRebuild(this.rectTransform);
     base.OnDisable();
 }
示例#2
0
        protected override void OnDestroy()
        {
#if UNITY_EDITOR
            GraphicRebuildTracker.UnTrackGraphic(this);
#endif
            GraphicRegistry.UnregisterGraphicForCanvas(canvas, this);
            CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);
            if (m_CachedMesh)
            {
                Destroy(m_CachedMesh);
            }
            m_CachedMesh = null;

            base.OnDestroy();
        }
示例#3
0
        /// <summary>
        /// Clear references.
        /// </summary>
        protected override void OnDisable()
        {
#if UNITY_EDITOR
            GraphicRebuildTracker.UnTrackGraphic(this);
#endif
            GraphicRegistry.UnregisterGraphicForCanvas(canvas, this);
            CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this);

            if (canvasRenderer != null)
            {
                canvasRenderer.Clear();
            }

            LayoutRebuilder.MarkLayoutForRebuild(rectTransform);
            SendGraphicEnabledDisabled();
            base.OnDisable();
        }