diff --git a/Megumin.UnityPackage/Packages/megumin.explosion4unity/Runtime/Scripts/NewClass/Attribute/NewButtonAttribute.cs b/Megumin.UnityPackage/Packages/megumin.explosion4unity/Runtime/Scripts/NewClass/Attribute/NewButtonAttribute.cs index 988bbe4..d44e85e 100644 --- a/Megumin.UnityPackage/Packages/megumin.explosion4unity/Runtime/Scripts/NewClass/Attribute/NewButtonAttribute.cs +++ b/Megumin.UnityPackage/Packages/megumin.explosion4unity/Runtime/Scripts/NewClass/Attribute/NewButtonAttribute.cs @@ -497,7 +497,9 @@ public void CacheSupportType(SerializedProperty property) SupportTypes = new Type[allTypes.Count + 1]; var currentType = property.managedReferenceValue?.GetType(); - DropMenuIndex = allTypes.Count; + + var indexCacheKey = (property.serializedObject.targetObject, property.propertyPath); + SelectedIndex[indexCacheKey] = allTypes.Count; foreach (var item in allTypes) { @@ -506,7 +508,7 @@ public void CacheSupportType(SerializedProperty property) if (currentType == item) { - this.DropMenuIndex = index; + SelectedIndex[indexCacheKey] = index; } index++; }