/// <summary> /// Constructor that accepts the <see cref="LogCache"/> <paramref name="logCache"/> that logs will be /// stored in and the <see cref="SceneValidationMode"/> <paramref name="validationMode"/> that scenes /// will be validated in (if any). /// </summary> /// <param name="logCache"></param> /// <param name="validationMode"></param> public AssetValidatorRunner(LogCache logCache, SceneValidationMode validationMode) { _scenePaths = ProjectTools.GetScenePaths(validationMode); _logCache = logCache; _cache = new ClassTypeCache(); // Ensure any unit test types do not get picked up for validation. _cache.IgnoreType <MonoBehaviourTwo>(); _cache.IgnoreAttribute <OnlyIncludeInTestsAttribute>(); // Find all objects for validation _cache.AddTypeWithAttribute <MonoBehaviour, ValidateAttribute>(); // Add all disabled logs for this run AssetValidatorOverrideConfig.FindOrCreate().AddDisabledLogs(logCache); _isRunning = true; _runningTime = EditorApplication.timeSinceStartup; }