Home › Page › UghInput


Inherits from MonoBehaviour

UghInput detects finger and mouse input and relays that information to all UghElements.  You can call UghInput class variables and functions from any script to get information about the current input.

UghInput is a smart object that will instantiate itself when needed.  (You should never have to manually add an UghInput to a scene.)

Class Variables
name type description
Instance UghInput Returns the instance of this class in the scene, or null if none.
InputPosition Vector3 The current position of the mouse or finger touching the screen.
InputPositionInWorldSpace Vector3 The InputPosition in world space (as relative to the UghCamera.)
IsInputDown boolean True if a finger is touching the screen or the left mouse button is down, false otherwise.
UseTouchInput boolean If touch input was detected as a valid means of input.

Class Functions
name type description
InputToWorldPoint Vector3 Converts a position on the screen to world position (as relative to the UghCamera.)