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; } }
private IEnumerable <ValidationInfo> FindValidationInfos() { return(SceneValidatorReflectionUtility.GetSceneValidationMethodsForType(ValidatorClass) .Select(mi => new ValidationInfo(mi, ValidationResult.Unknown))); }