Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Correct OnPointerDown and OnPointerUp implementations in JS?

$
0
0
Hi guys, what i need is to know when im clicking over an UI element or not, i used to use hotcontrol with the legacy system, still was bad because it only worked with buttons.

With the new UI it seems that OnPointerUP/Down callbacks do exactly what i need and i came across with scritp that do exactly what i need

Code (CSharp):
  1. using UnityEngine;
  2. using UnityEngine.EventSystems;
  3.  
  4. public class PointerDownTracker : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
  5. {
  6. public static bool...
Correct OnPointerDown and OnPointerUp implementations in JS?

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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