Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Phuzz on December 13, 2015, 03:59:30 AM

Title: IsPointerOverUi "StoreObject"
Post by: Phuzz on December 13, 2015, 03:59:30 AM
Hello

I have a grid of UI images, something like a crosswords game, I have an FSM attached to the Image prefab, is there a way to use "IsPointerOverUi" action with the Gameobject variable ? I need to store the UI object the the pointer is over, this way I can manage all buttons from one manager instead of having many FSMs when many are created for harder levels. So basically something like a MousePick event but with UI.
Title: Re: IsPointerOverUi "StoreObject"
Post by: jeanfabre on December 13, 2015, 01:16:17 PM
Hi,

 This is a good question. I'll investigate. however, I would suggest you properly setup each objects supposed to respond to the user input, as opposed to create an fsm that catch everything and becomes very tricky to handle as your needs will grow.

 Bye,

 Jean
Title: Re: IsPointerOverUi "StoreObject"
Post by: Phuzz on December 14, 2015, 12:36:33 PM
Alright :) thanks for the advice, and for your help.
Title: Re: IsPointerOverUi "StoreObject"
Post by: jeanfabre on December 21, 2015, 06:48:06 AM
Hi,

 It turns out you can't Unity isn't providing this information in that form.

http://docs.unity3d.com/462/Documentation/ScriptReference/EventSystems.EventSystem.IsPointerOverGameObject.html

Bye,

 Jean