EventTrigger OnPointerUp Slider Snap Back to Zero?
So in my multiplayer game, I have some sliders on the canvas which which the player uses to move objects in the scene, where if you move the slider to X value the object moves in a certain direction at X speed until the slider returns to zero. I'm trying to do this all on a mobile device touch screen. What I want to do is implement a function where when I let go of the slider handle, it will snap back to zero. The main idea I have right now is just attaching a script with a snapback funtion where I just set the slider's value to zero on the EventTrigger component OnPointerUp. But then there's this line from the Unity EventTrigger manual that I don't understand: "NOTE: Attaching this component to a GameObject will make that object intercept ALL events, and no events will propagate to parent objects". And I still have UI elements (buttons, dropdowns) in the parent object of the sliders that I need to access from the player and using to call other functions pressing (using singletons to do that ex. cameraMode = control.cameraMode; cameraMode.onClick.AddListener(() => ToggleCameraMode());
).
So if my method doesn't work, any other idea on how to do this? Also does button.onClick.AddListener(() => Function()) work with mobile touch input?
Your answer
Follow this Question
Related Questions
Held UI button C# 0 Answers
Why can't spam click on UI Image ? 0 Answers
UI Button Mouse Area is not working correctly! 0 Answers
So i want this problem with ui buttons done 1 Answer
Multiple mobile devices 0 Answers