UnityEditor.SavedGUIState.Create C# (CSharp) Method

Create() static private method

static private Create ( ) : SavedGUIState
return SavedGUIState
        internal static SavedGUIState Create()
        {
            SavedGUIState state = new SavedGUIState();
            if (Internal_GetGUIDepth() > 0)
            {
                state.skin = GUI.skin;
                state.layoutCache = new GUILayoutUtility.LayoutCache(GUILayoutUtility.current);
                Internal_SetupSavedGUIState(out state.guiState, out state.screenManagerSize);
            }
            return state;
        }

Usage Example

示例#1
0
        void MakeModal()
        {
            // If we already have modal window up we don't need to setup another modal message loop
            if (ContainerWindow.s_Modal)
            {
                return;
            }

            try
            {
                ContainerWindow.s_Modal = true;

                SavedGUIState guiState = SavedGUIState.Create();
                // TODO need to promote this outside of UIE
                UnityEngine.UIElements.EventDispatcher.editorDispatcher.PushDispatcherContext();

                Internal_MakeModal(m_Parent.window);

                UnityEngine.UIElements.EventDispatcher.editorDispatcher.PopDispatcherContext();
                guiState.ApplyAndForget();
            }
            finally
            {
                ContainerWindow.s_Modal = false;
            }
        }
All Usage Examples Of UnityEditor.SavedGUIState::Create