16
NGUI 3 Support / BoxCollider does not stop Input in 3.X
« on: October 21, 2013, 04:27:46 PM »
Hey there,
so in order to stop Input on Buttons (and other stuff) I created in my a "STOPINPUTCOLLIDER" which is a GameObject with a Transform and only a BoxCollider; set to Trigger.
I change his Center.Z value like I want to certain values, most the time it is set to -15 so no button on screen (which have center.z values from 0 to -10) can be touched.
This worked great for me.
NOW in 3.X I'm experiencing some weird stuff with this method. It kind of works in a different, weird and for my purposes not userfriendly way. It doesn't matter if I change the Value of the center.z, Buttons can be pressed. I managed to find out what the problem was. The Depth of the Background-Sprites of the Buttons.
When set to 0 or something negative the STOPINPUTCOLLIDER works, but as soon the Depth-Value of some sprites are set to 1 or above, the STOPINPUTCOLLIDER is ignored and every button can be touched.
Is there a solution to that or a workaround?
so in order to stop Input on Buttons (and other stuff) I created in my a "STOPINPUTCOLLIDER" which is a GameObject with a Transform and only a BoxCollider; set to Trigger.
I change his Center.Z value like I want to certain values, most the time it is set to -15 so no button on screen (which have center.z values from 0 to -10) can be touched.
This worked great for me.
NOW in 3.X I'm experiencing some weird stuff with this method. It kind of works in a different, weird and for my purposes not userfriendly way. It doesn't matter if I change the Value of the center.z, Buttons can be pressed. I managed to find out what the problem was. The Depth of the Background-Sprites of the Buttons.
When set to 0 or something negative the STOPINPUTCOLLIDER works, but as soon the Depth-Value of some sprites are set to 1 or above, the STOPINPUTCOLLIDER is ignored and every button can be touched.
Is there a solution to that or a workaround?