playMaker

Author Topic: klicking through UI  (Read 131 times)

Nietzsche

  • Playmaker Newbie
  • *
  • Posts: 26
    • View Profile
klicking through UI
« on: September 03, 2019, 07:58:42 AM »
hello,
 I have another problem with clicking and detecting objects on the screen. My problem is that whenever I click on a UI-element all fsm's that use a mouse-pick detect what object is beneath the button. How cna I prevent this, as they don't seem to detect any button.

I googled my problem, and yes the buttons are selected as raycast targets, while the only other solution I seemd to find included coding in c++ at the event-manager.

Thank you for your help

Broken Stylus

  • Sr. Member
  • ****
  • Posts: 282
    • View Profile
Re: klicking through UI
« Reply #1 on: September 03, 2019, 11:12:42 AM »
There was a similar problem a week ago and it might have the answer you're looking for.
How To Stop Raycast / Button Click, Going through UI Panel[SOLVED]

Nietzsche

  • Playmaker Newbie
  • *
  • Posts: 26
    • View Profile
Re: klicking through UI
« Reply #2 on: September 03, 2019, 12:24:56 PM »
hello, thank you for the suggestion, could you please explain this for me further:

Quote
Once you have your CanvasGroup Component on your GameObject, you can control it using the actions:

UiCanvasGroupSetProperties
UiCanvasGroupSetAlpha


we also have a proxy component called PlayMakerCanvasRaycastFilterProxy

That you control via the action UiCanvasEnableRaycast

Can you please tell me how to use the proxy, and what I do next after asigning "CanvasGroup Component" to my components.

Thanks already

Broken Stylus

  • Sr. Member
  • ****
  • Posts: 282
    • View Profile
Re: klicking through UI
« Reply #3 on: September 04, 2019, 02:42:30 AM »
The best way to understand them is to test them yourself, it works better and the brain remembers this better too.
Either you create a Test game object under which you'll put plenty of children, each one dedicated to a specific test, or you literally create a test scene in your project to which you'll return every time you need to try something.
The proxy is the intermediary tool used by Playmaker to manipulate certain Unity functions, otherwise they could not "talk" to each other.
The Canvas Group component is a really simple appendice. There are at least two actions to manipulate this component, one that sets the alpha and another one that controls all the options of the component, including the alpha too.