Author Topic: NGUI 3.6.2 and WP8 EventDelegate broken  (Read 1639 times)

impc

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 5
    • View Profile
NGUI 3.6.2 and WP8 EventDelegate broken
« on: June 05, 2014, 02:20:11 PM »
Hi,
I found an issue with EventDelegates (on windows phone 8 ), it's working fine when delegate is assigned using inspector, but fails when using from code.
ex. x.SetOnFinished(new EventDelegate(delegate() {....}) );

It shows error about method not found from class.
When reverting back to 3.6.1 for EventDelegate.cs, all works.

Reverting back to following line
mMethod = type.GetMethod(mMethodName, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);

Thanks!
« Last Edit: June 05, 2014, 02:52:24 PM by impc »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 3.6.2 and WP8 EventDelegate broken
« Reply #1 on: June 06, 2014, 02:20:47 AM »
From my testing, type.GetMethod(name, binding flags) doesn't work at all on WP8 devices. Something to do with inheritance? I don't recall. There's something glitchy with that method on WP8. Only type.GetMethod(name) works.

I suggest making your functions public so that you don't run into this issue.

impc

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: NGUI 3.6.2 and WP8 EventDelegate broken
« Reply #2 on: June 06, 2014, 07:40:42 AM »
For my situation, when i change unity editor platform to WP8, it does not work in editor and also do not work on actual phone Lumia 925.
Reverting back to previous EventDelegate.cs version it does work.
Unfortuanately i don't have much time to investigate it more. But when i will get some time for this i will do.

NB! Editor is running on Win 8.1pro

thanks