Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Artrageous on September 28, 2014, 08:41:07 PM

Title: Best way to pass an OnClick event on to objects behind the top one?
Post by: Artrageous on September 28, 2014, 08:41:07 PM
What is the best way to pass an OnClick event on to objects behind the top object?
I have a button, with a Box collider, that gets OnClick() events. I have my own OnClick routine  to handle these. This works fine.
I want the parent object the button is on to also get the OnClick event when I click the button.
This parent object is a sprite, it is the parent of the button in the object hierarchy, and behind it in the scene.
What is the best way to do this?
I could get a  reference to the parent object, store it in the button, and call the it's routines in the button OnClick , but this seems a bit unwieldy.

Thanks

Artrageous

PS
Have the feeling that this is a stupid question, and I am missing something obvious!
Title: Re: Best way to pass an OnClick event on to objects behind the top one?
Post by: ArenMook on September 29, 2014, 07:16:04 AM
UIEventTrigger or UIForwardEvents.
Title: Re: Best way to pass an OnClick event on to objects behind the top one?
Post by: Artrageous on September 30, 2014, 08:51:54 PM
Thank you.
I knew it had to be something simple.

Artrageous