* 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
22 lines
534 B
C#
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 |