Added GameObject Validators
This commit is contained in:
parent
c8a6815316
commit
269789b36f
15 changed files with 160 additions and 13 deletions
13
README.md
13
README.md
|
|
@ -9,6 +9,19 @@ A tool to help validate data across scenes, prefabs and scriptable objects.
|
|||

|
||||

|
||||
|
||||
## 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue