Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: KaLYoshiKa on October 10, 2016, 07:11:34 PM

Title: Playmaker u Gui Pointer Event issue[SOLVED]
Post by: KaLYoshiKa on October 10, 2016, 07:11:34 PM
Hey

I've been trying to implement transparency culling for usage with uGui to use non-square shapes. (I've been using the method found here https://coeurdecode.com/2015/10/18/non-rectangular-ui-buttons-in-unity/ ).

But once activated On Pointer no longer resolves properly. It can no longer detect correctly entering a UI element. Any chance for a fix to use non-square uGui elements?

Thanks
Title: Re: Playmaker u Gui Pointer Event issue
Post by: jeanfabre on October 11, 2016, 05:18:20 AM
Hi,

 Good question, but tricky case :)

 This is a feature, not a bug and is handled by Unity itself. These actions only use the Unity api, so what it returns isn't something we can do anything about.

http://answers.unity3d.com/questions/850739/click-through-transparent-parts-of-image.html

so basically, clicks only happen with colliders, if you have a complex shape, you'll need to either get the pixel under the click, check for it's alpha and forward only if not fully transparent, or add a mesh collider defining the clickable area.

 Bye,

 Jean