playMaker

Author Topic: Buttons doesn't work when instantiating  (Read 1888 times)

mecauz

  • Playmaker Newbie
  • *
  • Posts: 10
Buttons doesn't work when instantiating
« on: September 16, 2022, 10:13:12 PM »
Hi,

I experiment a lot of this issue on device and finally i get the problem but i don't know why it's even happened. I'm making a mobile game and i use a lot of buttons.

Global transitions UI CLICK and UI POINTER CLICK (prefab or not) works fine both unity and android device. But when i create the button prefab in scene (with Create Object or Create Object Advanced) from some actions happened in the game, in Unity it's work fine but in Android device (or emulator) i can't interract with, it doesn't work. But if i set state or send event from Unity's button component to the button, it works fine.

I want to create buttons or any other UI objects during in running the game and using UI CLICK transation. How can i do that? Am i missing something?

Thank you.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Buttons doesn't work when instantiating
« Reply #1 on: September 18, 2022, 04:15:45 PM »
Hi.
maybe you can use the UI On Click action instead and UI On Pointer down (not sure if thats the correct one/name)

mecauz

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Buttons doesn't work when instantiating
« Reply #2 on: September 18, 2022, 08:38:48 PM »
Hi djaydino,

I try to use "UI Button On Click Event" and it worked. I didin't know this action even exist.

So that means the problem was global UI Events don't triggered when created.

Thank you very much.