playMaker

Author Topic: Playmaker u Gui Pointer Event issue[SOLVED]  (Read 1239 times)

KaLYoshiKa

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Playmaker u Gui Pointer Event issue[SOLVED]
« on: October 10, 2016, 04: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
« Last Edit: October 11, 2016, 02:18:46 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14703
  • Official Playmaker Support
    • View Profile
Re: Playmaker u Gui Pointer Event issue
« Reply #1 on: October 11, 2016, 02: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