1
0
mirror of https://github.com/maxartz15/Validator.git synced 2024-11-21 19:55:34 +01:00

Update AssetValidator.cs

This commit is contained in:
max 2021-12-29 16:18:44 +01:00
parent 2eee6cb661
commit 47377903fe

View File

@ -8,7 +8,7 @@ namespace Validator.Editor
{
public Report Validate()
{
Report reporter = new Report("AssetValidator");
Report report = new Report("AssetValidator");
List<Object> objects = FindAssetsByType<Object>();
for (int i = 0; i < objects.Count; i++)
@ -16,12 +16,12 @@ namespace Validator.Editor
EditorUtility.DisplayProgressBar("AssetValidator", "Validate...", (float)i / objects.Count);
if (objects[i] is IValidatable validatable)
{
validatable.Validate(reporter);
validatable.Validate(report);
}
}
EditorUtility.ClearProgressBar();
return reporter;
return report;
}
public static List<T> FindAssetsByType<T>() where T : Object