Onclicked works differently

Hello, I am working on a professional project which will be used to present products on terminals during various events, and I am encountering a problem, when my .exe application is launched, I sometimes have to press a button twice for it to work , and sometimes it works by clicking only once, I nevertheless configured my buttons in the same way, I will show you an example;


bp1

Do any of you have a solution? I’ve done some research and tested different ones but so far it hasn’t worked.

Thank you !
Nicolas

its sounds like the widget isnt focused, so the first click sets the focus and the second hits the button.

is your input mode set to UI only?

I noticed with the print string that when I press my button (on a touch screen) the 2 actions “play” and “pause” are displayed simultaneously, which in this example therefore cancels the play action, however I can’t find how to fix this, I tried replacing Onclicked with Onpressed, but no difference

Hi,
I feel like this is a dirty fix : you can add a “Do Once” node before your “Flip Flop” node that you reset only after calling your “switch variant by name”.
However I’m still not sure it will fix your problem :confused:

This works once or twice but when I repeat the operation, the problem returns and the two actions of the variant switch are called at the same time, it’s a bit like display and hide were called at the same time, no modification on my screen

One click, but two actions

I don’t really know what “Switch on Variant by Name” is using for so I don’t know for this part but it’s weird.
You said that you were using touch screen, maybe it is because of the time the button is pressed by your finger. In that case you can try to play around with the Touch Method setting in your designer

Yes when I let my finger press for a long time (2 seconds), it works correctly, however I would like it to work on the first touch

This does the same thing on my button which launches an animation with the sequencer

I found something that could be useful for you, check this post :

thank you for your time, it still doesn’t work very well, with the mouse everything is fine but the touch is complicated :confused:

Yeah, I feel like Unreal Engine doesn’t really like touch input ^^’

I got around the problem by adding a delay, which prevents the “double click” and therefore the double function simultaneously.

For the moment, it’s fine