private void Update()
        {
            PopupQueue.TryShowNextPopup();
            if (numEnabledCheatMods() > 0 && Bridge.IsSimulating() && !BridgeCheat.m_Cheated)
            {
                GameStateSim.m_BudgetUsed = Mathf.RoundToInt(Budget.CalculateBridgeCost());
                BridgeCheat.m_Cheated     = BridgeCheat.CheckForCheating((float)GameStateSim.m_BudgetUsed);
            }
            if (!flag && globalToggleHotkey.Value.IsDown())
            {
                flag = true;
                if (this.isEnabled)
                {
                    this.isEnabled = modEnabled.Value = false;
                    this.disableMod();
                }
                else
                {
                    this.isEnabled = modEnabled.Value = true;
                    this.enableMod();
                }
                if (modsToggledSummary.Length > 0)
                {
                    PopUpWarning.Display(modsToggledSummary);
                }
                //Logger.LogMessage(modsToggledSummary);
            }
            else if (flag & globalToggleHotkey.Value.IsUp())
            {
                flag = false;
            }

            if (autoDraw == null)
            {
                var autoDraw = GameObject.Find("GameUI/Panel_TopBar/HorizontalLayout/GridStress/ButtonsHorizontalLayout/ButtonContainer_AutoDraw");
                if (autoDraw == null)
                {
                    return;
                }
                autoDraw.SetActive(true);
                sandbox          = GameObject.Find("GameUI/Panel_TopBar/HorizontalLayout/CenterInfo/Sandbox");
                sandboxSettings  = GameObject.Find("GameUI/Panel_TopBar/HorizontalLayout/CenterInfo/Sandbox/ButtonsHorizontalLayout/Button_SandboxSettings");
                sandboxCreate    = GameObject.Find("GameUI/Panel_TopBar/HorizontalLayout/CenterInfo/Sandbox/ButtonsHorizontalLayout/Button_Create");
                sandboxVehicles  = GameObject.Find("GameUI/Panel_TopBar/HorizontalLayout/CenterInfo/Sandbox/ButtonsHorizontalLayout/Button_Vehicles");
                sandboxWorkshop  = GameObject.Find("GameUI/Panel_TopBar/HorizontalLayout/CenterInfo/Sandbox/ButtonsHorizontalLayout/Button_Workshop");
                sandboxResources = GameObject.Find("GameUI/Panel_TopBar/HorizontalLayout/CenterInfo/Sandbox/ButtonsHorizontalLayout/Button_Resources");
            }

            sandboxCreate.SetActive(GameStateManager.GetState() == GameState.SANDBOX);
            sandboxVehicles.SetActive(GameStateManager.GetState() == GameState.SANDBOX);
            sandboxWorkshop.SetActive(GameStateManager.GetState() == GameState.SANDBOX);
            sandboxSettings.SetActive(true);
            sandboxResources.SetActive(true);
            sandbox.SetActive((sandboxEverywhere.Value && PolyTechMain.modEnabled.Value) || GameStateManager.GetState() == GameState.SANDBOX);
        }