UnityEditor.EditorUtility.Internal_UpdateAllMenus C# (CSharp) Method

Internal_UpdateAllMenus() private method

private Internal_UpdateAllMenus ( ) : void
return void
        internal static extern void Internal_UpdateAllMenus();
        [MethodImpl(MethodImplOptions.InternalCall)]

Usage Example

示例#1
0
        private static void OnModeChangeLayouts(ModeChangedArgs args)
        {
            // Prevent double loading the default/last layout already done by the WindowLayout system.
            if (args.prevIndex == -1)
            {
                return;
            }

            if (HasCapability(ModeCapability.LayoutSwitching, true))
            {
                WindowLayout.SaveCurrentLayoutPerMode(GetModeId(args.prevIndex));

                try
                {
                    if (args.nextIndex != 0 || args.prevIndex == -1 || HasCapability(args.prevIndex, ModeCapability.LayoutSwitching, true))
                    {
                        // Load the last valid layout for this mode
                        WindowLayout.LoadCurrentModeLayout(keepMainWindow: true);
                    }
                }
                catch (Exception)
                {
                    // Error while loading layout. Load the default layout for current mode.
                    WindowLayout.LoadDefaultLayout();
                }
            }

            if (HasCapability(ModeCapability.LayoutWindowMenu, true))
            {
                WindowLayout.ReloadWindowLayoutMenu();
                EditorUtility.Internal_UpdateAllMenus();
            }
        }
All Usage Examples Of UnityEditor.EditorUtility::Internal_UpdateAllMenus
EditorUtility