Renamed all attributes and drawers to have postfix of either Attribute or AttributeDrawer
This commit is contained in:
parent
81bac32538
commit
dc15bfec81
161 changed files with 265 additions and 265 deletions
|
|
@ -0,0 +1,17 @@
|
|||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(EnableFieldInPlayModeAttribute))]
|
||||
internal sealed class EnableFieldInPlayModeAttributeDrawer : AccessModifierPropertyDrawer
|
||||
{
|
||||
public override EAccessType GetAccessType(AccessModifierPropertyAttribute attribute, SerializedProperty property, EAccessType currentAccessType)
|
||||
{
|
||||
if (currentAccessType == EAccessType.Enabled && !Application.isPlaying)
|
||||
currentAccessType = EAccessType.ReadOnly;
|
||||
|
||||
return currentAccessType;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue