Added component validators
This commit is contained in:
parent
35f271e12b
commit
d7145ad772
30 changed files with 448 additions and 200 deletions
13
README.md
13
README.md
|
|
@ -9,6 +9,19 @@ A tool to help validate data across scenes, prefabs and scriptable objects.
|
|||

|
||||

|
||||
|
||||
## Component Validators
|
||||
|
||||
```
|
||||
public sealed class ComponentValidatorMeshCollider : IComponentValidator<MeshCollider>
|
||||
{
|
||||
public void Validate(MeshCollider component, List<ValidatorResult> results)
|
||||
{
|
||||
if (component.sharedMesh == null)
|
||||
results.Add(ValidatorResult.Create(EValidatorSeverity.Error, "Missing mesh"));
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Attribute Validators
|
||||
|
||||
The field attrribute:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue