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(); } }
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; } }
public static void RemoveCachedPanel(int instanceID) { UIElementsUtility.RemoveCachedPanel(instanceID); }