Added initial version 0.1.0
This commit is contained in:
parent
6aa4cb8596
commit
416759c213
64 changed files with 2181 additions and 0 deletions
21
Editor/Hierarchy/EditorProjectValidatorProject.cs
Normal file
21
Editor/Hierarchy/EditorProjectValidatorProject.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.ProjectValidator.Editor
|
||||
{
|
||||
[InitializeOnLoad]
|
||||
internal static class EditorProjectValidatorProject
|
||||
{
|
||||
static EditorProjectValidatorProject()
|
||||
{
|
||||
EditorApplication.projectWindowItemOnGUI -= OnProjectWindowItemOnGUI;
|
||||
EditorApplication.projectWindowItemOnGUI += OnProjectWindowItemOnGUI;
|
||||
}
|
||||
|
||||
private static void OnProjectWindowItemOnGUI(string guid, Rect selectionRect)
|
||||
{
|
||||
if (Report.HasActive && Report.Active.TryGetSeverityFor(guid, out var mapping) && mapping.Severity != EValidatorSeverity.Valid)
|
||||
EditorIconUtility.Draw(new Rect(selectionRect.x, selectionRect.y, selectionRect.height, selectionRect.height), mapping.Severity, mapping.IsRedirect);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue