playMaker

Author Topic: UI Click Events  (Read 915 times)

mecauz

  • Playmaker Newbie
  • *
  • Posts: 10
UI Click Events
« on: February 28, 2023, 03:25:45 PM »
Hello,

I'm developing a mobile game and it's mostly ui. I use some popups or interfaces very few. So i want to instantiate most of the popups. But when i create a button on runtime, i can't use "UI Click" or "UI Pointer Click" or any other Global Transation on mobile (in Editor works).

It's work when using "UI Button on Click Event" or "UI On Pointer Click Event". But i don't want to use those actions. I need Global Transations like i attached in this thread. I create buttons on runtime and try all Global Transations on Android device and none of them work.

Is there any way to work them?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: UI Click Events
« Reply #1 on: March 01, 2023, 10:24:32 AM »
Hi.
For Buttons you can can use the "On Click" on the component.

drag/drop the object with the fsm faster you added a onclick event.

then select playmaker and send event then put the event name you want to trigger (don't use the UI Click Global, make your own)

only downside on this is that the playmaker fsm need to be the top one in the inspector (if you have multiple fsms on the object)

mecauz

  • Playmaker Newbie
  • *
  • Posts: 10
Re: UI Click Events
« Reply #2 on: March 01, 2023, 01:24:33 PM »
Hi.
For Buttons you can can use the "On Click" on the component.

drag/drop the object with the fsm faster you added a onclick event.

then select playmaker and send event then put the event name you want to trigger (don't use the UI Click Global, make your own)

only downside on this is that the playmaker fsm need to be the top one in the inspector (if you have multiple fsms on the object)

Hello djaydino,

Thank you for reply, i'm aware that work around. But i don't like that it's rely on "names". And when i need add another button i have to do process again. Some objects i have had multiple fsms so i have to do every one of them.

I have a another workaround that adding another fsm for just "button" function that it's only track button and send event another fsms who need it. With this i can do even some fsm templates but i don't like that either  :)

I really like UI Click Global Transation and i'm very happy to use them since i discover. It's easy to implement, it's simple (fsm states)  8). Can i ask why it doesn't work when creating prefabs in runtime ?

Thank you.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: UI Click Events
« Reply #3 on: March 01, 2023, 01:40:33 PM »
Hi.
I don't know why it does not work.
Its best to post a bug report so Alex can have a look at this.

provide as much info as you can :)

mecauz

  • Playmaker Newbie
  • *
  • Posts: 10
Re: UI Click Events
« Reply #4 on: March 01, 2023, 02:08:43 PM »
Hi.
I don't know why it does not work.
Its best to post a bug report so Alex can have a look at this.

provide as much info as you can :)

Hello djaydino,

I posted a bug report.

Thank you.