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

How do I use new Touch.pressure?

$
0
0
Touch.pressure was introduced in patch version 5.2.2p1. I am trying to use it experimentally, just to see what is being returned. The Unity editor throws no errors, but when I try to build using Cloud Build (set to Use Latest for Xcode and Unity version) I get the following:> error CS1061: Type `UnityEngine.Touch' does not contain a definition for `pressure' and no extension method `pressure' of type `UnityEngine.Touch' could be found (are you missing a using directive or an assembly reference?) The project is set up to require iOS 9.0 minumum. Here's my code - very basic, just updating a UI Text element with the touch pressure every frame. float touchPressure; void Update() { if (Input.touchCount > 0) { touchPressure = Input.GetTouch(0).pressure; pressureText.text = touchPressure + ""; } { There isn't any documentation about this yet, so any help would be greatly appreciated!

Viewing all articles
Browse latest Browse all 4709

Trending Articles



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