mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-01 20:25:07 +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
|
internal class AvatarObjectReferenceDrawer : PropertyDrawer
|
||||||
{
|
{
|
||||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||||
|
{
|
||||||
|
label = EditorGUI.BeginProperty(position, label, property);
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (CustomGUI(position, property, label)) return;
|
if (CustomGUI(position, property, label)) return;
|
||||||
|
|
||||||
@ -24,6 +27,11 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
string.IsNullOrEmpty(property.stringValue) ? "(null)" : property.stringValue);
|
string.IsNullOrEmpty(property.stringValue) ? "(null)" : property.stringValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
EditorGUI.EndProperty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private bool CustomGUI(Rect position, SerializedProperty property, GUIContent label)
|
private bool CustomGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user