Author Topic: [Solved] Can I pass parameters via UIButtonMessage.functionName ?  (Read 3869 times)

alexlange

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 34
    • View Profile
Hi

I want to send a parameter like "ID" to a manger script while player clicking some gameobject.
I know UIButtonMessage is a good option to send a call
But it looks like that "functionName" property is a string
And won't work if I set it to something lilke target="Manager",functionName="OnMyClick(2)". ???

Any suggest? Thank you :D
« Last Edit: December 02, 2012, 02:36:57 AM by alexlange »

alexlange

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 34
    • View Profile
Re: Can I pass parameters via UIButtonMessage.functionName ?
« Reply #1 on: December 02, 2012, 02:36:08 AM »
Oh I get it, UIButtonMessage also send its attached gameobject now.
We can use OnMyClick(gameobject sender) to handle this. ;)