Author Topic: How to get a 2DToolkit Sprite to get sent NGUI Events such as OnClick()  (Read 3796 times)

zachprinz

  • Guest
Here is my current hierarchy set up.


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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
NGUI's UICamera sends events to colliders that it sees that are also cleared by the UICamera's eventMask filter.

zachprinz

  • Guest
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.)



It happens every time on every popup list I have.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Possibly related to the size of the highlight. Perhaps it's just too big, so when NGUI positions it, it gets weird.