/// <summary>Method that will be called just before creating the ContainerWindow for this fullscreen.</summary> protected virtual void BeforeOpening() { FullscreenCallbacks.beforeFullscreenOpen(this); if (m_dst.Container) { new Exception("Container already has a fullscreened view"); } }
protected virtual void OnDestroy() { Logger.Debug(name + " destroyed"); if (m_dst.Container) { m_dst.Container.InvokeMethod("Close"); Logger.Warning("Destroying {0} which has open containers, always close the fullscreen before destroying it", name); } FullscreenCallbacks.afterFullscreenClose(this); }
/// <summary>Destroy this container and exit fullscreen.</summary> public virtual void Close() { FullscreenCallbacks.beforeFullscreenClose(this); if (!m_dst.Window && m_dst.Container) { Logger.Error("Placeholder window has been closed, Fullscreen Editor won't be able to restore window position"); } if (m_dst.Container) // Container may have been destroyed by Alt+F4 { m_dst.Container.InvokeMethod("Close"); // Closes the container, all its views and the windows } DestroyImmediate(this, true); }
/// <summary>Method that will be called after the creation of the ContainerWindow for this fullscreen.</summary> protected virtual void AfterOpening() { After.Frames(2, () => UnityEditorInternal.InternalEditorUtility.RepaintAllViews()); Logger.Debug(this, "{6}\n\nSRC\nWindow: {0}\nView: {1}\nContainer: {2}\n\nDST\nWindow: {3}\nView: {4}\nContainer: {5}\n", m_src.Window, m_src.View, m_src.Container, m_dst.Window, m_dst.View, m_dst.Container, name ); FullscreenCallbacks.afterFullscreenOpen(this); }