Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: pdrocb on October 16, 2013, 04:43:13 PM

Title: get GameObject that called notified method (IUButton)
Post by: pdrocb on October 16, 2013, 04:43:13 PM
Hello,

How do I get the name of the Button that called my method in the another script?

In the OnClick option under IUButton script I can set the method of another gameobject that I want to call.
In this called method I want to get the button that made the call.

I'm using the lastest version of NGUI 3.0.2

Regards,
Title: Re: get GameObject that called notified method (IUButton)
Post by: macy on October 16, 2013, 08:33:13 PM
Please see if this helps:
http://www.tasharen.com/forum/index.php?topic=5444.0
Title: Re: get GameObject that called notified method (IUButton)
Post by: Spek on October 29, 2013, 05:31:08 AM
same question
also, in the OnClick "Notify" option under IUButton script I can only choose methods without arguments.
Title: Re: get GameObject that called notified method (IUButton)
Post by: ArenMook on October 29, 2013, 04:51:50 PM
Debug.Log(UIButton.current.name);