Change: rename method

This commit is contained in:
AnnulusGames 2024-02-17 14:50:56 +09:00
parent d56f989028
commit f6526b3cc1
3 changed files with 6 additions and 9 deletions

View File

@ -30,12 +30,12 @@ namespace Alchemy.Editor.Elements
}
else
{
element = GUIHelper.CreateObjectField(property, type);
element = GUIHelper.CreateObjectPropertyField(property, type);
}
break;
case SerializedPropertyType.Generic:
var targetType = property.GetPropertyType(isArrayElement);
if (InternalAPIHelper.GetDrawerTypeForType(targetType) != null)
{
element = new PropertyField(property);

View File

@ -29,15 +29,12 @@ namespace Alchemy.Editor.Elements
foldout.BindProperty(property);
field = GUIHelper.CreateObjectField(property, type);
field = GUIHelper.CreateObjectPropertyField(property, type);
field.style.position = Position.Absolute;
field.style.width = Length.Percent(100f);
field.schedule.Execute(() =>
{
OnPropertyChanged(property);
field.RegisterValueChangeCallback(x => OnPropertyChanged(x.changedProperty));
});
// OnPropertyChanged(property);
field.RegisterValueChangeCallback(x => OnPropertyChanged(x.changedProperty));
Add(foldout);
Add(field);

View File

@ -51,7 +51,7 @@ namespace Alchemy.Editor
};
}
public static PropertyField CreateObjectField(SerializedProperty property, Type type)
public static PropertyField CreateObjectPropertyField(SerializedProperty property, Type type)
{
Assert.IsTrue(property.propertyType == SerializedPropertyType.ObjectReference);