Class TouchSimulation
Adds a Touchscreen with input simulated from other types of Pointer devices (e.g. Mouse or Pen).
Inherited Members
Namespace: UnityEngine.InputSystem.EnhancedTouch
Syntax
[AddComponentMenu("Input/Debug/Touch Simulation")]
[ExecuteInEditMode]
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(Int32)
Declaration
protected void InstallStateChangeMonitors(int startIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
Int32 | startIndex |
OnDisable()
Declaration
protected void OnDisable()
OnEnable()
Declaration
protected void OnEnable()
OnSourceControlChangedValue(InputControl, Double, InputEventPtr, Int64)
Declaration
protected void OnSourceControlChangedValue(InputControl control, double time, InputEventPtr eventPtr, long sourceDeviceAndButtonIndex)
Parameters
Type | Name | Description |
---|---|---|
InputControl | control | |
Double | time | |
InputEventPtr | eventPtr | |
Int64 | sourceDeviceAndButtonIndex |
RemovePointer(Pointer)
Declaration
protected void RemovePointer(Pointer pointer)
Parameters
Type | Name | Description |
---|---|---|
Pointer | pointer |
UninstallStateChangeMonitors(Int32)
Declaration
protected void UninstallStateChangeMonitors(int startIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
Int32 | startIndex |
Explicit Interface Implementations
IInputStateChangeMonitor.NotifyControlStateChanged(InputControl, Double, InputEventPtr, Int64)
Declaration
void IInputStateChangeMonitor.NotifyControlStateChanged(InputControl control, double time, InputEventPtr eventPtr, long monitorIndex)
Parameters
Type | Name | Description |
---|---|---|
InputControl | control | |
Double | time | |
InputEventPtr | eventPtr | |
Int64 | monitorIndex |
Implements
IInputStateChangeMonitor.NotifyTimerExpired(InputControl, Double, Int64, Int32)
Declaration
void IInputStateChangeMonitor.NotifyTimerExpired(InputControl control, double time, long monitorIndex, int timerIndex)
Parameters
Type | Name | Description |
---|---|---|
InputControl | control | |
Double | time | |
Int64 | monitorIndex | |
Int32 | timerIndex |