Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: zachprinz on April 19, 2013, 02:09:38 PM

Title: How to get a 2DToolkit Sprite to get sent NGUI Events such as OnClick()
Post by: zachprinz on April 19, 2013, 02:09:38 PM
Here is my current hierarchy set up.
(http://i.imgur.com/7JzvnXV.png)

I'm trying to use methods such as OnClick() that are called from NGUI (specifically the UICamera I think?) in scripts that are attatched to 2DToolkit animated sprites. However, If i understand it properly, only NGUI objects get sent alterts for things like OnClick() or OnHover().

Is there a script I can attach to the 2D Toolkit sprites to allow them to receive those alerts?
Title: Re: How to get a 2DToolkit Sprite to get sent NGUI Events such as OnClick()
Post by: ArenMook on April 19, 2013, 02:13:50 PM
NGUI's UICamera sends events to colliders that it sees that are also cleared by the UICamera's eventMask filter.
Title: Re: How to get a 2DToolkit Sprite to get sent NGUI Events such as OnClick()
Post by: zachprinz on April 19, 2013, 04:47:21 PM
Ok, figured that all out.

Completely unrelated problem, but no need to start a new thread, is there anything obvious that would cause a popup list to do this (talking about the highlight being to the top left of the options.)

(http://i.imgur.com/UaUAeZy.png)

It happens every time on every popup list I have.
Title: Re: How to get a 2DToolkit Sprite to get sent NGUI Events such as OnClick()
Post by: ArenMook on April 19, 2013, 11:20:43 PM
Possibly related to the size of the highlight. Perhaps it's just too big, so when NGUI positions it, it gets weird.