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
This commit is contained in:
parent
05f04657c5
commit
ee7326c33a
8 changed files with 198 additions and 31 deletions
22
Runtime/Drawers/ReadableScriptableObjectAttribute.cs
Normal file
22
Runtime/Drawers/ReadableScriptableObjectAttribute.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#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
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 319dfc0b017247d69fbe91575384ccf8
|
||||
timeCreated: 1639910607
|
||||
Loading…
Add table
Add a link
Reference in a new issue