Support => NGUI 3 Support => Topic started by: juggernate on July 25, 2013, 09:02:26 AM
Title: Sticky Press seems always on (Upgrading from 2.3.6 to 2.6.3)
Post by: juggernate on July 25, 2013, 09:02:26 AM
I had sticky press OFF so I could slide my finger across a number of objects (sort of like piano keys) without having to press each one with separate press events. This was working while I was on 2.3.6.
Now after upgrading to 2.6.3, I still have Sticky Press OFF on the UICamera, but I can no longer slide across the objects, I have to tap each object individually for the OnPress event to fire. Now it behaves the same whether I turn Sticky Press ON or OFF. :(
Title: Re: Sticky Press seems always on (Upgrading from 2.3.6 to 2.6.3)
Post by: ArenMook on July 26, 2013, 04:11:15 AM
o_O works fine here...
Title: Re: Sticky Press seems always on (Upgrading from 2.3.6 to 2.6.3)
Post by: juggernate on July 26, 2013, 07:22:04 AM
Dang. I'm not sure what to try. It doesn't work on my Mac 10.8.4 if I upgrade NGUI on either Unity 3.5.7 or 4.2.
I am calling this on a gameObject with just a Mesh Renderer, Trigger Collider but no other NGUI components. Am I now supposed to have some NGUI component attached?
This is essentially how I'm using OnPress and it was working fine before, am I doing something wrong? Even with sticky OFF I get the Debug message when I let go outside of the object, instead of when the cursor leaves the collision area like it did in 2.3.6
void OnPress (bool isDown){
Debug.Log("Pressing: "+ gameObject.name);
if(isDown){
toggleKey();
}
}
Title: Re: Sticky Press seems always on (Upgrading from 2.3.6 to 2.6.3)
Post by: ArenMook on July 27, 2013, 12:42:01 PM
Open up UICamera.cs, go to around line 1103 (lines may differ from the version I have), and comment out this:
// If the user is pressing down and has dragged the touch away from the original object,
// unpress the original object and notify the new object that it is now being pressed on.
Title: Re: Sticky Press seems always on (Upgrading from 2.3.6 to 2.6.3)
Post by: juggernate on July 27, 2013, 05:15:53 PM
That did it. Thanks! :) Also, I should mention my build target is iOS. I just learned that non-sticky would work on the device, but not in the editor. But now with commenting out that line it works in both. Thanks