0
Answered

How should I press the button to press and bounce?

qiwanggame 4 years ago updated by Lazlo Bonin (Lead Developer) 4 years ago 4

Here, I don't know how to use "PointerEventData""

Come and give me a hand!

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

Not sure myself but unless you have a specific need to do it that way below is an easier one assuming your goal is to do something when the UI button is clicked on-

In the Fuzzy Finder, under Events/GUI choose- On Button Click, works fine.


I would like to understand how DataEvents work. But my non Programmer Bain just don't get it.
My workaround for now is to add an Event Trigger to as example an Slider (normale you just get an OnValveChangedEvent on the solder inside Bolt).

Set PointerDown and a PointerUpevent, which enables/disables the flow machine for the Slider interaction.

2017_09_04_15_58_56_Unity_2017_1_0f3_64bit_test_unity_IZA008_Creapolis_Research_PC_Mac

Answered

Hi qiwanggame! Welcome to the community.

William is right, using On Button Click is the right way to listen for a click event on a button.

For other pointer events, they're currently missing, but will be added in v.1.0.5: 

http://support.ludiq.io/topics/388-missing-pointer-events-for-gui/