Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: MaxUylings on September 20, 2012, 05:05:07 AM
-
Hello,
We just bought the NGUI extension and have just started to play around with it.
The thing I noticed is that sometimes the UIButton fires twice. And also sometimes it stays on the "Pressed" status of the button. Is there a way to avoid this?
Kind Regards,
Max Uijlings
-
This isnt something i've noticed before unless your using iOS and Unity remote. can you give any more details?
-
I am using IOS with Unity remote. So I assume that what you are suggesting is that when I deploy it to the iPhone this behaviour will not occur?
Kind Regards,
Max Uijlings
-
Yup.
-
Could you maybe tell me why this happens when using the unity remote? This way when I have a similar thing in the future I understand what happens and I can recognise when it is the remote and when it is a real problem.
kind regards
-
Because it sends both mouse and touch events, and NGUI treats both equally. Select the UICamera and uncheck the mouse events.
-
I unchecked the mouse events in the UICamera, but I still have it fire twice sometimes.
-
I just ran the app on my iPhone and the problem was indeed gone. So thanks for the clarification. I now know not to trust the remote to much and will do my testing and debugging on the device again. To bad because the remote was a very nice and fast solution compared to building and running every time.
Kind Regards,
Max
-
i had this same problem, turns out it was because i had the button call an OnClick() function. i changed the function name to ButtonPressed() and it no longer fired twice.