Exemple #1
0
    /// <summary>Called on the frame when the StartGuiManager script is enabled.</summary>
    /// <remarks>Use this for initialization.</remarks>
    void Start()
    {
        Manager.InitializeScreen();

        SetUIScaling(Manager.UIScalingEnabled);

        Manager.UpdateMainThreadReference();

        ProgressDialogPanelScript.SetVisible(false);
        MessageDialogPanelScript.SetVisible(false);
        ExceptionDialogPanelScript.SetVisible(false);
        MainMenuDialogPanelScript.SetVisible(true);

        LoadButton.interactable = HasSaveFilesToLoad();
    }
Exemple #2
0
    /// <summary>Handler used for logging, tracing and debugging.</summary>
    /// <param name="logString">The string to be logged.</param>
    /// <param name="stackTrace">The stack trace.</param>
    /// <param name="type">The type of log message.</param>
    public void HandleLog(string logString, string stackTrace, LogType type)
    {
        Manager.HandleLog(logString, stackTrace, type);

        if (type == LogType.Exception)
        {
            Manager.EnableLogBackup();

            Manager.EnqueueTaskAndWait(() =>
            {
                ExceptionDialogPanelScript.SetDialogText(logString);
                ExceptionDialogPanelScript.SetVisible(true);

                return(true);
            });
        }
    }