1.1.0: Added validate attribute with NotNullField
This commit is contained in:
parent
18356eb532
commit
41ced8fdb7
15 changed files with 166 additions and 8 deletions
|
|
@ -5,6 +5,7 @@
|
|||
PredrawerModifier,
|
||||
Drawer,
|
||||
ValueModifier,
|
||||
AccessModifier
|
||||
AccessModifier,
|
||||
Validate
|
||||
}
|
||||
}
|
||||
7
Runtime/ValidatePropertyAttribute.cs
Normal file
7
Runtime/ValidatePropertyAttribute.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
namespace Module.Inspector
|
||||
{
|
||||
public abstract class ValidatePropertyAttribute : AbstractPropertyAttribute
|
||||
{
|
||||
public override EPropertyType Type => EPropertyType.Validate;
|
||||
}
|
||||
}
|
||||
3
Runtime/ValidatePropertyAttribute.cs.meta
Normal file
3
Runtime/ValidatePropertyAttribute.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8b9e492ca9c74144ab913bc4d44a3cb6
|
||||
timeCreated: 1638625294
|
||||
3
Runtime/Validators.meta
Normal file
3
Runtime/Validators.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ae50d6f9a5924095b1622fdce766030b
|
||||
timeCreated: 1638625321
|
||||
14
Runtime/Validators/NotNullFieldAttribute.cs
Normal file
14
Runtime/Validators/NotNullFieldAttribute.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public class NotNullFieldAttribute : ValidatePropertyAttribute
|
||||
{
|
||||
[Preserve]
|
||||
public NotNullFieldAttribute()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Runtime/Validators/NotNullFieldAttribute.cs.meta
Normal file
3
Runtime/Validators/NotNullFieldAttribute.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 869816e3d1fa460dbcb80195c70e8af4
|
||||
timeCreated: 1638625328
|
||||
Loading…
Add table
Add a link
Reference in a new issue