Welcome,
Guest
. Please
login
or
register
.
June 14, 2026, 06:34:34 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Making OnPress fire false when leaving the collider bounds
« previous
next »
Print
Pages: [
1
]
Author
Topic: Making OnPress fire false when leaving the collider bounds (Read 3706 times)
Fordeka
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 20
Making OnPress fire false when leaving the collider bounds
«
on:
August 07, 2012, 11:33:57 AM »
Hi Aren,
I need to have buttons that release if you touch and drag outside the bounds of the button's collider, can you suggest a good way to achieve this behavior without seriously tangling up NGUI?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Making OnPress fire false when leaving the collider bounds
«
Reply #1 on:
August 07, 2012, 12:36:21 PM »
You can cancel the effect's visual component by sending SendMessage("OnPress", false) to the highlighted button. You can check to see what's under the mouse in your update function by checking UICamera.lastHit.collider.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Making OnPress fire false when leaving the collider bounds