Show / Hide Table of Contents

Class Input

Inheritance
Object
Input
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEngine
Assembly: UnityEngine.dll
Syntax
public class Input

Properties

acceleration

Declaration
public static Vector3 acceleration { get; }
Property Value
Type Description
Vector3

accelerationEventCount

Declaration
public static int accelerationEventCount { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

accelerationEvents

Declaration
public static AccelerationEvent[] accelerationEvents { get; }
Property Value
Type Description
AccelerationEvent[]

anyKey

Declaration
public static bool anyKey { get; }
Property Value
Type Description
Boolean

anyKeyDown

Declaration
public static bool anyKeyDown { get; }
Property Value
Type Description
Boolean

backButtonLeavesApp

Declaration
public static bool backButtonLeavesApp { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

compass

Declaration
public static Compass compass { get; }
Property Value
Type Description
Compass

compensateSensors

Declaration
public static bool compensateSensors { get; set; }
Property Value
Type Description
Boolean

compositionCursorPos

Declaration
public static Vector2 compositionCursorPos { get; set; }
Property Value
Type Description
Vector2

compositionString

Declaration
public static string compositionString { get; }
Property Value
Type Description
String

deviceOrientation

Declaration
public static DeviceOrientation deviceOrientation { get; }
Property Value
Type Description
DeviceOrientation

eatKeyPressOnTextFieldFocus

Declaration
[Obsolete("eatKeyPressOnTextFieldFocus property is deprecated, and only provided to support legacy behavior.")]
public static bool eatKeyPressOnTextFieldFocus { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

gyro

Declaration
public static Gyroscope gyro { get; }
Property Value
Type Description
Gyroscope

imeCompositionMode

Declaration
public static IMECompositionMode imeCompositionMode { get; set; }
Property Value
Type Description
IMECompositionMode

imeIsSelected

Declaration
public static bool imeIsSelected { get; }
Property Value
Type Description
Boolean

inputString

Declaration
public static string inputString { get; }
Property Value
Type Description
String

isGyroAvailable

Declaration
[Obsolete("isGyroAvailable property is deprecated. Please use SystemInfo.supportsGyroscope instead.")]
public static bool isGyroAvailable { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

location

Declaration
public static LocationService location { get; }
Property Value
Type Description
LocationService

mousePosition

Declaration
public static Vector3 mousePosition { get; }
Property Value
Type Description
Vector3

mousePresent

Declaration
public static bool mousePresent { get; }
Property Value
Type Description
Boolean

mouseScrollDelta

Declaration
public static Vector2 mouseScrollDelta { get; }
Property Value
Type Description
Vector2

multiTouchEnabled

Declaration
public static bool multiTouchEnabled { get; set; }
Property Value
Type Description
Boolean

simulateMouseWithTouches

Declaration
public static bool simulateMouseWithTouches { get; set; }
Property Value
Type Description
Boolean

stylusTouchSupported

Declaration
public static bool stylusTouchSupported { get; }
Property Value
Type Description
Boolean

touchCount

Declaration
public static int touchCount { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

touches

Declaration
public static Touch[] touches { get; }
Property Value
Type Description
Touch[]

touchPressureSupported

Declaration
public static bool touchPressureSupported { get; }
Property Value
Type Description
Boolean

touchSupported

Declaration
public static bool touchSupported { get; }
Property Value
Type Description
Boolean

Methods

GetAccelerationEvent(Int32)

Declaration
public static AccelerationEvent GetAccelerationEvent(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
AccelerationEvent

GetAxis(String)

Declaration
public static float GetAxis(string axisName)
Parameters
Type Name Description
String axisName
Returns
Type Description
Single

GetAxisRaw(String)

Declaration
public static float GetAxisRaw(string axisName)
Parameters
Type Name Description
String axisName
Returns
Type Description
Single

GetButton(String)

Declaration
public static bool GetButton(string buttonName)
Parameters
Type Name Description
String buttonName
Returns
Type Description
Boolean

GetButtonDown(String)

Declaration
public static bool GetButtonDown(string buttonName)
Parameters
Type Name Description
String buttonName
Returns
Type Description
Boolean

GetButtonUp(String)

Declaration
public static bool GetButtonUp(string buttonName)
Parameters
Type Name Description
String buttonName
Returns
Type Description
Boolean

GetJoystickNames()

Declaration
public static string[] GetJoystickNames()
Returns
Type Description
String[]
| Improve this Doc View Source

GetKey(String)

Declaration
public static bool GetKey(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Boolean
| Improve this Doc View Source

GetKey(KeyCode)

Declaration
public static bool GetKey(KeyCode key)
Parameters
Type Name Description
KeyCode key
Returns
Type Description
Boolean
| Improve this Doc View Source

GetKeyDown(String)

Declaration
public static bool GetKeyDown(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Boolean
| Improve this Doc View Source

GetKeyDown(KeyCode)

Declaration
public static bool GetKeyDown(KeyCode key)
Parameters
Type Name Description
KeyCode key
Returns
Type Description
Boolean
| Improve this Doc View Source

GetKeyUp(String)

Declaration
public static bool GetKeyUp(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Boolean
| Improve this Doc View Source

GetKeyUp(KeyCode)

Declaration
public static bool GetKeyUp(KeyCode key)
Parameters
Type Name Description
KeyCode key
Returns
Type Description
Boolean

GetMouseButton(Int32)

Declaration
public static bool GetMouseButton(int button)
Parameters
Type Name Description
Int32 button
Returns
Type Description
Boolean

GetMouseButtonDown(Int32)

Declaration
public static bool GetMouseButtonDown(int button)
Parameters
Type Name Description
Int32 button
Returns
Type Description
Boolean

GetMouseButtonUp(Int32)

Declaration
public static bool GetMouseButtonUp(int button)
Parameters
Type Name Description
Int32 button
Returns
Type Description
Boolean

GetTouch(Int32)

Declaration
public static Touch GetTouch(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
Touch

IsJoystickPreconfigured(String)

Declaration
public static bool IsJoystickPreconfigured(string joystickName)
Parameters
Type Name Description
String joystickName
Returns
Type Description
Boolean

ResetInputAxes()

Declaration
public static void ResetInputAxes()

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX