mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 18:55:06 +08:00
fix: add BeginProperty to AvatarObjectReferenceDrawer
This commit is contained in:
parent
cca9e22edd
commit
ad9d9019c5
@ -7,6 +7,9 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
internal class AvatarObjectReferenceDrawer : PropertyDrawer
|
||||
{
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
label = EditorGUI.BeginProperty(position, label, property);
|
||||
try
|
||||
{
|
||||
if (CustomGUI(position, property, label)) return;
|
||||
|
||||
@ -24,6 +27,11 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
string.IsNullOrEmpty(property.stringValue) ? "(null)" : property.stringValue);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
EditorGUI.EndProperty();
|
||||
}
|
||||
}
|
||||
|
||||
private bool CustomGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user