Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

Test for over UI 4.6 works on Mac doesn't work on iPad

$
0
0
I have created a small script that tests for whether the mouse is over a UI element, and returns that state. I then use this to determine whether to raycast. It works properly on the Mac, but when testing on the iPad, it doesn't. Any idea what I might be doing wrong? using UnityEngine; using System.Collections; using UnityEngine.EventSystems; public class touchTest : MonoBehaviour { public int overUI = 0; public int ReturnUIState (){ return overUI; } void Update () { if (EventSystemManager.currentSystem.IsPointerOverEventSystemObject ()) { // we're over a UI element... overUI = 1; } else{ overUI = 0; } } } Thank you!

Viewing all articles
Browse latest Browse all 4709

Trending Articles



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