From f2ef65d95ef52f75ea1efed9e7feadddc9d6bde9 Mon Sep 17 00:00:00 2001 From: Raymond Tsang Date: Fri, 22 Jul 2022 12:14:07 +0800 Subject: [PATCH] Update EasyEventEditor.cs Fix #16 --- EasyEventEditor.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/EasyEventEditor.cs b/EasyEventEditor.cs index 95e3df7..1e40962 100755 --- a/EasyEventEditor.cs +++ b/EasyEventEditor.cs @@ -677,6 +677,7 @@ private class EventClipboardStorage { public static SerializedObject CopiedEventProperty; public static int CopiedEventIndex; + public static string CopiedPropertyPath; } private void HandleCopy() @@ -685,6 +686,7 @@ private void HandleCopy() EventClipboardStorage.CopiedEventProperty = serializedEvent; EventClipboardStorage.CopiedEventIndex = currentState.reorderableList.index; + EventClipboardStorage.CopiedPropertyPath = listenerArray.propertyPath; } private void HandlePaste() @@ -702,7 +704,8 @@ private void HandlePaste() if (iterator != null && iterator.name == "m_PersistentCalls") { iterator = iterator.FindPropertyRelative("m_Calls"); - break; + if (iterator.propertyPath == EventClipboardStorage.CopiedPropertyPath) + break; } }