private void Validate() { var stopwatch = System.Diagnostics.Stopwatch.StartNew(); validationErrors_.Clear(); if (ValidateScriptableObjects_) { IList <IValidationError> errors = ValidationUtil.ValidateAllSavedScriptableObjects(earlyExitOnError: false); if (errors != null) { validationErrors_.AddRange(errors); } } if (ValidateOpenScenes_) { IList <IValidationError> errors = ValidationUtil.ValidateAllGameObjectsInOpenScenes(earlyExitOnError: false); if (errors != null) { validationErrors_.AddRange(errors); } } if (ValidateBuildScenes_) { IList <IValidationError> errors = ValidationUtil.ValidateAllGameObjectsInBuildSettingScenes(earlyExitOnError: false); if (errors != null) { validationErrors_.AddRange(errors); } } if (ValidateSavedScenes_) { IList <IValidationError> errors = ValidationUtil.ValidateAllGameObjectsInSavedScenes(earlyExitOnError: false); if (errors != null) { validationErrors_.AddRange(errors); } } if (ValidatePrefabsInResources_) { IList <IValidationError> errors = ValidationUtil.ValidateAllGameObjectsInResources(earlyExitOnError: false); if (errors != null) { validationErrors_.AddRange(errors); } } stopwatch.Stop(); validationTimeInMS_ = stopwatch.ElapsedMilliseconds; }