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; } }