1
0
mirror of https://github.com/maxartz15/Validator.git synced 2025-01-22 15:54:50 +01:00
2021-12-29 16:18:44 +01:00
2021-12-27 00:52:50 +01:00
2021-12-29 16:18:44 +01:00
2021-12-26 02:15:37 +01:00
2021-12-27 00:52:50 +01:00
2021-12-27 00:52:50 +01:00
2021-12-27 00:52:50 +01:00
2021-12-27 00:52:50 +01:00
2021-12-27 00:52:50 +01:00
2021-12-27 00:52:50 +01:00
2021-12-27 00:52:50 +01:00
2021-12-27 00:52:50 +01:00
2021-12-27 00:52:50 +01:00
2021-12-27 00:52:50 +01:00
2021-12-26 02:15:37 +01:00
2021-12-27 00:52:50 +01:00

Validator

Unity project validator framework.

Getting Started

Open Validator Window:

Window -> General -> Validator

Add validatable:

using Validator;

public class MyBehaviour : MonoBehaviour, IValidatable
{
    [SerializeField] private float startHealth = 10; // If someone was to put it to low <= 0, it would be invalid.

#if UNITY_EDITOR
    public void Validate(Report report)
	{
        // Check if health is valid.
		if(startHealth <= 0)
		{
            // If not, log it.
			report.Log(this, WarningType.Warning, ReportCategories.Design, $"{nameof(startHealth)} is to low", $"Make value > 0");
		}
	}
#endif
}

Install

Installing from a Git URL

Unitypackage

LICENSE

Overall package is licensed under MIT, unless otherwise noted in the 3rd party licenses file and/or source code.

Description
Unity project validator framework.
Readme 98 KiB
Languages
C# 100%