1
0
mirror of https://github.com/maxartz15/Validator.git synced 2024-11-08 22:35:33 +01:00

Update README.md

This commit is contained in:
max 2022-01-01 20:33:46 +01:00
parent 74fd067220
commit 9c01bed215
2 changed files with 14 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -1,12 +1,11 @@
# Validator
![ValidatorWindow](Documentation~/Images/ValidatorWindow_01.png)
Unity project validator framework.
## Getting Started
Open Validator Window:
> Window -> General -> Validator
Add validatable:
Add a custom validate check using the `IValidatable` interface:
```C#
using Validator;
@ -28,13 +27,21 @@ public class MyBehaviour : MonoBehaviour, IValidatable
}
```
Add a validate check using `[Required]` attribute:
```C#
[SerializeField, Required] private GameObject playerPrefab = null; // If someone forgets to assign it, it would be invalid.
```
Open Validator Window:
> Window -> General -> Validator
Run the validator:
> Click the 'run/play' button and wait for the report to be generated.
## Install
[Installing from a Git URL](https://docs.unity3d.com/Manual/upm-ui-giturl.html)
[Unitypackage](https://github.com/COMPANYNAME/PACKAGENAME/releases)
## LICENSE
Overall package is licensed under [MIT](/LICENSE.md), unless otherwise noted in the [3rd party licenses](/THIRD%20PARTY%20NOTICES.md) file and/or source code.