Class TouchSimulation
Adds a Touchscreen with input simulated from other types of Pointer devices (e.g. Mouse or Pen).
Implements
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.InputSystem.EnhancedTouch
Assembly: Unity.InputSystem.dll
Syntax
[AddComponentMenu("Input/Debug/Touch Simulation")]
[ExecuteInEditMode]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.inputsystem@1.14/manual/Touch.html#touch-simulation")]
[InitializeOnLoad]
public class TouchSimulation : MonoBehaviour, IInputStateChangeMonitor
Properties
instance
Declaration
public static TouchSimulation instance { get; }
Property Value
Type | Description |
---|---|
TouchSimulation |
simulatedTouchscreen
Declaration
public Touchscreen simulatedTouchscreen { get; }
Property Value
Type | Description |
---|---|
Touchscreen |
Methods
AddPointer(Pointer)
Declaration
protected void AddPointer(Pointer pointer)
Parameters
Type | Name | Description |
---|---|---|
Pointer | pointer |
Destroy()
Declaration
public static void Destroy()
Disable()
Declaration
public static void Disable()
Enable()
Declaration
public static void Enable()
InstallStateChangeMonitors(int)
Declaration
protected void InstallStateChangeMonitors(int startIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
int | startIndex |
OnDisable()
Declaration
protected void OnDisable()
OnEnable()
Declaration
protected void OnEnable()
OnSourceControlChangedValue(InputControl, double, InputEventPtr, long)
Declaration
protected void OnSourceControlChangedValue(InputControl control, double time, InputEventPtr eventPtr, long sourceDeviceAndButtonIndex)
Parameters
Type | Name | Description |
---|---|---|
InputControl | control | |
double | time | |
InputEventPtr | eventPtr | |
long | sourceDeviceAndButtonIndex |
RemovePointer(Pointer)
Declaration
protected void RemovePointer(Pointer pointer)
Parameters
Type | Name | Description |
---|---|---|
Pointer | pointer |
UninstallStateChangeMonitors(int)
Declaration
protected void UninstallStateChangeMonitors(int startIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
int | startIndex |