playMaker

Author Topic: Layer Mask in Mouse Pick !  (Read 1295 times)

san

  • Junior Playmaker
  • **
  • Posts: 93
Layer Mask in Mouse Pick !
« on: July 09, 2020, 04:32:44 AM »
Hello, I am having this small problem with MousePick Layer mask.

On screen I have a button... and Mouse pick Object is overlaying every-time i press a button.

But on Button I have UI layer and I try using Layer Mask invert Mask turn on/off doesn't work. I don't know how to stop Mouse Pick Object is overlaying every-time i press a button. Please help. Thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Layer Mask in Mouse Pick !
« Reply #1 on: July 09, 2020, 05:42:24 AM »
Hi.
Mouse pick does not work on ui.

The is an action called 'Is Pointer Over Ui Object'
you can use this to disable/enable Mouse pick.

so that if you are over a button the 'fsm with the 'mouse pick can be disabled

san

  • Junior Playmaker
  • **
  • Posts: 93
Re: Layer Mask in Mouse Pick !
« Reply #2 on: July 09, 2020, 07:34:05 PM »
hmmm... So the "is Pointer Over Ui Object" work ~!

A few more issue ~! maybe this is a bug.. i am not sure...

In Canvas, I have two buttons...
Button ONE - doesnt have any playmaker FSM actions.. Empty ~!
Button TWO - does have FSM action with "is Pointer Over UI Object", In this action I did ON/OFF with "active game Object" and it work ~! But not working with Set Property - Playmaker FSM Active ON/OFF in iPhone. is this a bug? On my iMac Set Property work fine~!

And when i Tested on iPhone... Active Game Object ON/OFF is work on Button ONE as well... But Button ONE doesn't have "is Pointer Over UI Object" action. Only Button Two does.

For example, If i press Button TWO... the touch Object is doing OFF.. and if I let go Button TWO... Touch object Turn ON. But it doing same thing in Button ONE as well, but Button One doesnt have any fsm action.

So "is Pointer Over UI Object" action work on entire iPhone screen? or is it because both Buttons are in a same Canvas ?
« Last Edit: July 09, 2020, 07:43:04 PM by san »

san

  • Junior Playmaker
  • **
  • Posts: 93
Re: Layer Mask in Mouse Pick !
« Reply #3 on: July 10, 2020, 02:50:03 AM »
i found some solution with Linker wizard for set/get property... its working now!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Layer Mask in Mouse Pick !
« Reply #4 on: July 10, 2020, 05:01:16 AM »
Hi.
You should minimize using Get/Set Property actions.

They work slower than dedicated actions as they use mirroring and indeed you need to use linker wizard and play the whole game to make sure that all are 'recorded' by the linker wizard.

i believe there is a standard 'Enable Fsm' action.
If not, you can find it on the Ecosystem

san

  • Junior Playmaker
  • **
  • Posts: 93
Re: Layer Mask in Mouse Pick !
« Reply #5 on: July 11, 2020, 12:49:43 AM »
-Just respond time slower on iPhone? I use set Property on Enemy Ai, so if i have more then 20 Ai... the respond time a lot slower?

-I still don't know how xml is created and is Linker wizard - only created for one scene or entire unity project? or what if i have a few different scene that has set property, will create a automatic link.xml as well?

-is there an action that Mask out by tag ID or Layer ID for touch screen?