Added GameObject Validators

This commit is contained in:
Anders Ejlersen 2026-05-18 21:59:59 +02:00
parent c8a6815316
commit 269789b36f
15 changed files with 160 additions and 13 deletions

View file

@ -9,6 +9,19 @@ A tool to help validate data across scenes, prefabs and scriptable objects.
![Hierachy Window](~Images/editor-hierarchy-window.png)
![Project Window](~Images/editor-project-window.png)
## Game Object Validators
```csharp
public sealed class GameObjectValidatorBrokenPrefab : IGameObjectValidator
{
public void Validate(GameObject gameObject, List<ValidatorResult> results)
{
if (PrefabUtility.IsPrefabAssetMissing(gameObject))
results.Add(ValidatorResult.Create(EValidatorSeverity.Error, "GameObject is missing prefab asset"));
}
}
```
## Component Validators
```csharp