playMaker

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

ETGgames

  • Junior Playmaker
  • **
  • Posts: 56
    • View Profile
    • ETGgames
How to use mouse pick with a canvas UI child?
« on: August 05, 2015, 11:26:30 AM »
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: 15377
  • Official Playmaker Support
    • View Profile
Re: How to use mouse pick with a canvas UI child?
« Reply #1 on: August 17, 2015, 11:40:55 AM »
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