From 7409bf911c558cfed8783b51700da8a5b88acbc8 Mon Sep 17 00:00:00 2001 From: yuyu0127 Date: Sun, 17 Mar 2024 00:23:35 +0900 Subject: [PATCH] Add: Support replacing the label text of each list element --- .../Editor/Elements/AlchemyPropertyField.cs | 3 +++ .../Alchemy/Editor/Elements/PropertyListView.cs | 17 +++++++++++++---- .../Runtime/Inspector/InspectorAttributes.cs | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/AlchemyPropertyField.cs b/Alchemy/Assets/Alchemy/Editor/Elements/AlchemyPropertyField.cs index e03bf84..4f7ded1 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/AlchemyPropertyField.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/AlchemyPropertyField.cs @@ -94,6 +94,9 @@ namespace Alchemy.Editor.Elements break; case PropertyField propertyField: propertyField.label = value; + // To reflect changes, simply setting the value to the label property is not enough, + // so you need to directly modify the label of elements with a specific class. + propertyField.Query