module-inspector/Runtime/Drawers/ReadableScriptableObjectAttribute.cs
Anders Ejlersen ee7326c33a 1.4.0: Added ReadableScriptableObjectAttribute and fixed an GUI.enable isssue
* Attribute: Added ReadableScriptableObjectAttribute to allow for inline editing of ScriptableObjects in the inspector
* Attribute: Fixed issue, where root drawer wouldn't use existing value of GUI.enabled, when setting GUI.enabled state with new access value
2021-12-19 13:45:23 +01:00

22 lines
534 B
C#

#if UNITY_2019_3_OR_NEWER
using System;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class ReadableScriptableObjectAttribute : DrawerPropertyAttribute
{
public readonly bool editable;
public ReadableScriptableObjectAttribute()
{
editable = true;
}
public ReadableScriptableObjectAttribute(bool editable)
{
this.editable = editable;
}
}
}
#endif