Ejemplo n.º 1
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                if (panelDebug != null)
                {
                    panelDebug.DetachAllDebuggers();
                    panelDebug = null;
                }
                if (ownerObject != null)
                {
                    UIElementsUtility.RemoveCachedPanel(ownerObject.GetInstanceID());
                }
            }
            else
            {
                DisposeHelper.NotifyMissingDispose(this);
            }

            yogaConfig = null;
            disposed   = true;
        }
 private static void RemoveCachedPanelInternal(int instanceID)
 {
     UIElementsUtility.RemoveCachedPanel(instanceID);
     // un-register the playerloop callback as the last panel gets un-registered
     UIElementsUtility.GetAllPanels(panelsIteration, ContextType.Player);
     if (panelsIteration.Count == 0)
     {
         s_RegisteredPlayerloopCallback = false;
         UnregisterPlayerloopCallback();
     }
 }
Ejemplo n.º 3
0
        private static void RemoveCachedPanelInternal(int instanceID)
        {
            UIElementsUtility.RemoveCachedPanel(instanceID);

            s_PanelOrderingDirty = true;

            // We don't call GetSortedPanels() here to avoid always sorting when we remove multiple panels in a row
            // the ordering is dirty anyways, it will eventually get recreated
            s_SortedRuntimePanels.Clear();
            UIElementsUtility.GetAllPanels(s_SortedRuntimePanels, ContextType.Player);

            // un-register the playerloop callback as the last panel gets un-registered
            if (s_SortedRuntimePanels.Count == 0)
            {
                s_RegisteredPlayerloopCallback = false;
                UnregisterPlayerloopCallback();
                Canvas.SetExternalCanvasEnabled(false);
            }
        }
        protected virtual void Dispose(bool disposing)
        {
            bool disposed = this.disposed;

            if (!disposed)
            {
                if (disposing)
                {
                    bool flag = this.panelDebug != null;
                    if (flag)
                    {
                        this.panelDebug.DetachAllDebuggers();
                        this.panelDebug = null;
                    }
                    bool flag2 = this.ownerObject != null;
                    if (flag2)
                    {
                        UIElementsUtility.RemoveCachedPanel(this.ownerObject.GetInstanceID());
                    }
                }
                this.yogaConfig = null;
                this.disposed   = true;
            }
        }
Ejemplo n.º 5
0
 public static void RemoveCachedPanel(int instanceID)
 {
     UIElementsUtility.RemoveCachedPanel(instanceID);
 }