playMaker

Author Topic: How to use mouse pick with a canvas UI child?  (Read 2237 times)

ETGgames

  • Junior Playmaker
  • **
  • Posts: 56
    • ETGgames
How to use mouse pick with a canvas UI child?
« on: August 05, 2015, 02:26:30 PM »
I have a panel set up in the canvas thats using overlay, but the action on the fsm on the panel is a mouse pick. However, I'm not getting any response from the mouse pick. Does mouse pick work with UI elements? is there a better way?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to use mouse pick with a canvas UI child?
« Reply #1 on: August 17, 2015, 02:40:55 PM »
Hi,

 yes, make each of your selectable items listening to OnClick and then either broadcast an Event or send an event to a Manager dealing with UI selection.

Use the uGui Component proxy for this, or the uGui Pointer Event Proxy

Mouse Pick and all the conventional mouse handling do not work with uGui, you have to use the "Event System" which is a very distinct system. It's confusing I know, but unfortunatly a necessary evil for proper event management across platforms and types of Input ( Mouse, Touch, Accessibility)

 Bye,

 Jean