Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Arowx on October 12, 2013, 03:23:20 PM

Title: Removing or Clearing Old EventDelegates from OnClick
Post by: Arowx on October 12, 2013, 03:23:20 PM
Hit an issue with Eventdelegates, I have copies a button already setup to call a specific method when OnClick is triggered.

But the OnClick Notify box just shows None.

It looks like Unity has serialised the EventDelegate information but the NGUI interface is not reading it back and showing it in the editor.

Is there a way to clear old EventDelegate information from buttons or a fix to ensure older information is visible in the editor?

Title: Re: Removing or Clearing Old EventDelegates from OnClick
Post by: ArenMook on October 13, 2013, 10:07:18 AM
NGUI removes invalid data automatically. This generally happens when you do something like have a prefab reference a component outside of it.
Title: Re: Removing or Clearing Old EventDelegates from OnClick
Post by: Arowx on October 13, 2013, 02:58:08 PM
OK it's not a prefab issue as I'm not using prefabs (no blue buttons) and 2 buttons that still work fine show up with None in their On Click fields so there definitely appears to be a case whereby the event delegate is being recorded in Unity but is not displayed in the Editor.
Title: Re: Removing or Clearing Old EventDelegates from OnClick
Post by: Nicki on October 13, 2013, 05:09:59 PM
I'm not sure the editor shows it, if you set the event delegate in code.
Title: Re: Removing or Clearing Old EventDelegates from OnClick
Post by: Arowx on October 13, 2013, 05:18:51 PM
I'm not setting the delegate in code, I used the IDE's OnClick settings.