diff --git a/Documentation~/Images/ValidatorWindow_01.png b/Documentation~/Images/ValidatorWindow_01.png new file mode 100644 index 0000000..0965aba Binary files /dev/null and b/Documentation~/Images/ValidatorWindow_01.png differ diff --git a/README.md b/README.md index 7eba5d3..67f4da4 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file