Author Topic: pass arguments with UIButton Message  (Read 8461 times)

tinyutopia

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
pass arguments with UIButton Message
« on: June 15, 2012, 01:45:02 PM »
I'm currently using UIButton Message in several situations where I need to pass some arguments along with the function call. Is there an easy way that I modify the script to do this?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: pass arguments with UIButton Message
« Reply #1 on: June 17, 2012, 07:13:07 PM »
Just create your own script that has an OnClick() function (or whatever else you may need).

oopstoto

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: pass arguments with UIButton Message
« Reply #2 on: July 21, 2014, 10:07:28 PM »
UIButton message sends gameObject itself as a parameter. Just attach any parameter to the gameObject