Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

Keeping touches from activating if a button was pressed (but ignoring other UI elements)

$
0
0
Per the image below, the circles are dual joysticks.

When the user clicks anywhere in the window, the joysticks will "snap" to that area. That all works great. But when the user clicks the "Open Window" button, the joystick "snaps" to that area too.

I tried using !EventSystem.current.IsPointerOverGameObject to block my Touch.Began code, but since the joystick circles are UI elements, that doesn't work.

Ultimately I'm going to have more buttons on the screen -- mostly in the...

Keeping touches from activating if a button was pressed (but ignoring other UI elements)

Viewing all articles
Browse latest Browse all 23263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>