Exemple #1
0
 // Start is called before the first frame update
 void Start()
 {
     QLog.Sample("QLog.Sample");
     QLog.Log("QLog.Log");
     QLog.LogEditor("QLog.LogEditor");
     QLog.LogError("QLog.LogError");
     QLog.LogErrorEditor("QLog.LogErrorEditor");
     QLog.LogWarning("QLog.LogWarning");
     QLog.LogWarningEditor("QLog.LogWarningEditor");
 }
Exemple #2
0
        private static void OpenScene(string sceneName)
        {
            if (string.IsNullOrEmpty(sceneName))
            {
                QLog.LogErrorEditor("无法打开场景,场景名字为空!!!");
                return;
            }

            if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
            {
                QLog.LogErrorEditor("请保存当前场景");
                return;
            }

            EditorSceneManager.OpenScene(sceneName);
        }