예제 #1
0
        static bool ValidateInternal()
        {
            if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
            {
                var originalSceneSetup = EditorSceneManager.GetSceneManagerSetup();

                try
                {
                    ZenUnityEditorUtil.ValidateCurrentSceneSetup();
                    Log.Info("All scenes validated successfully");
                    return(true);
                }
                catch (Exception e)
                {
                    Log.ErrorException(e);
                    return(false);
                }
                finally
                {
                    EditorSceneManager.RestoreSceneManagerSetup(originalSceneSetup);
                }
            }
            else
            {
                Debug.Log("Validation cancelled - All scenes must be saved first for validation to take place");
                return(false);
            }
        }
예제 #2
0
 static bool ValidateCurrentSceneInternal()
 {
     return(ValidateWrapper(() =>
     {
         ZenUnityEditorUtil.ValidateCurrentSceneSetup();
         ModestTree.Log.Info("All scenes validated successfully");
     }));
 }