Author Topic: about EventDalegate drawer/editor  (Read 41857 times)

gyd

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 87
    • View Profile
Re: about EventDalegate drawer/editor
« Reply #15 on: August 09, 2016, 11:44:34 PM »
yes but the way limited the naming rule..

consider with this case:
we have to drag an object to assign duration field of a tween, or limit the name of tween's game object.

i feel the same thing when i use the the event delegate with parameters, that's why i suggest the modification since march 2015.

gyd

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 87
    • View Profile
Re: about EventDalegate drawer/editor
« Reply #16 on: February 17, 2017, 04:47:07 AM »
You can simply name your buttons 1, 2, 3 and 4 -- then do
  1. void SetPlayers ()
  2. {
  3.     int.TryParse(UIButton.current.name, out players);
  4. }

hi ArenMook,
sorry to push this up again,

the Unity 5 ( not sure since which version ) supports UnityEvent to store a EventDelegate,
I think it's a solution to support this issue :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: about EventDalegate drawer/editor
« Reply #17 on: February 18, 2017, 07:26:22 PM »
Not sure what "UnityEvent to store a EventDelegate" means. :P

UnityEvent supports static values, but only if the function has a single parameter. Even if I was to consider switching to it, I can't do it as it will completely break all backwards compatibility, in addition to forcing everyone to set up multiple function calls instead of a single function with multiple parameters.

gyd

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 87
    • View Profile
Re: about EventDalegate drawer/editor
« Reply #18 on: February 19, 2017, 07:07:39 AM »
Not sure what "UnityEvent to store a EventDelegate" means. :P

UnityEvent supports static values, but only if the function has a single parameter. Even if I was to consider switching to it, I can't do it as it will completely break all backwards compatibility, in addition to forcing everyone to set up multiple function calls instead of a single function with multiple parameters.

that's true,
i think the only way now is list all the variable of types OTZ