Files
Hasebe/Library/PackageCache/com.annulusgames.alchemy@1402075f473d/Samples~/Samples/Scripts/Validation/ValidateInputSample.cs
T
2026-09-21 12:15:57 +03:00

25 lines
498 B
C#

using UnityEngine;
using Alchemy.Inspector;
namespace Alchemy.Samples
{
public class ValidateInputSample : MonoBehaviour
{
[ValidateInput("IsNotNull")]
public GameObject obj;
[ValidateInput("IsZeroOrGreater", "foo must be 0 or greater.")]
public int foo = -1;
static bool IsNotNull(GameObject go)
{
return go != null;
}
static bool IsZeroOrGreater(int a)
{
return a >= 0;
}
}
}