mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-05-15 15:49:01 +08:00
fix: add BeginProperty to AvatarObjectReferenceDrawer
This commit is contained in:
parent
3a94498e45
commit
3ceafb8e1f
@ -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…
x
Reference in New Issue
Block a user