public static void DrawValidatorItemsGUI(SceneValidatorState sceneValidatorState)
        {
            var scrollControlID = GUIUtility.GetControlID(FocusType.Passive);
            var scrollState     = (ScrollState)GUIUtility.GetStateObject(typeof(ScrollState), scrollControlID);

            using (var scrollView = new GUILayout.ScrollViewScope(scrollState.scrollPosition))
            {
                scrollState.scrollPosition = scrollView.scrollPosition;
                foreach (var validationInfo in sceneValidatorState.GetValidationInfosSorted())
                {
                    if (SceneValidatorDrawing.ValidationItem(validationInfo.Result, validationInfo.Description))
                    {
                        var validatorInstance = Activator.CreateInstance(sceneValidatorState.ValidatorClass);
                        var success           = (bool)validationInfo.ValidationMethod.Invoke(validatorInstance, null);
                        validationInfo.Result = success ? ValidationResult.Success : ValidationResult.Fail;
                    }
                }
            }
        }
 private void SetupSceneValidator(bool state = false)
 {
     sceneValidatorState = null;
     if (EditorSceneManager.loadedSceneCount == 1)
     {
         var  scenePath      = EditorSceneManager.GetActiveScene().path;
         Type validatorClass = SceneValidatorReflectionUtility.GetValidatorFor(scenePath, state);
         if (validatorClass != null)
         {
             sceneValidatorState = new SceneValidatorState(validatorClass);
             windowState         = WindowState.Valid;
         }
         else
         {
             windowState = WindowState.NoValidatorForScene;
         }
     }
     else
     {
         windowState = WindowState.NotExactlyOneSceneOpen;
     }
 }