コード例 #1
0
 private void SetupSceneValidator()
 {
     sceneValidatorState = null;
     if (EditorSceneManager.loadedSceneCount == 1)
     {
         var  scenePath      = EditorSceneManager.GetActiveScene().path;
         Type validatorClass = SceneValidatorReflectionUtility.GetValidatorFor(scenePath);
         if (validatorClass != null)
         {
             sceneValidatorState = new SceneValidatorState(validatorClass);
             windowState         = WindowState.Valid;
         }
         else
         {
             windowState = WindowState.NoValidatorForScene;
         }
     }
     else
     {
         windowState = WindowState.NotExactlyOneSceneOpen;
     }
 }
コード例 #2
0
 private IEnumerable <ValidationInfo> FindValidationInfos()
 {
     return(SceneValidatorReflectionUtility.GetSceneValidationMethodsForType(ValidatorClass)
            .Select(mi => new ValidationInfo(mi, ValidationResult.Unknown)));
 }