timo-sisus / Power-Inspector

Report bugs and offer improvement ideas for Power Inspector.
http://u3d.as/1sNc
8 stars 0 forks source link

Pasting of copied unity event's listener pastes empty value. #10

Closed tettogreen closed 4 years ago

tettogreen commented 4 years ago

Unity Version: 2018.4.11.f1 OS: Windows

Steps:

  1. Add any custom written component with 2 serialized UnityEvent fields to a game object;
  2. In the inspector of the component add and set a listener to one of the events;
  3. Select the listener, right click it and select "Copy";
  4. Right click other event and select "Paste"

Result: "Pasted value to " popup appears but the list of event listeners is still null. (see screenshot). Also following exception occurs in the log:

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Expected Result: The listener was successfully copied into the second event.

image

timo-sisus commented 4 years ago

Copy-paste has now been changed to include all private fields by default, which has also fixed copy-pasting of UnityEvents. This change will most likely be included in the next update.

tettogreen commented 4 years ago

Cool!