Class InputTestRuntime | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class InputTestRuntime

    An implementation of for use during tests.

    Inheritance
    System.Object
    InputTestRuntime
    Namespace: UnityEngine.Experimental.Input
    Syntax
    public class InputTestRuntime : IInputRuntime, IDisposable
    Remarks

    This class is only available in the editor and in development players.

    The test runtime replaces the services usually supplied by .

    Properties

    advanceTimeEachDynamicUpdate

    Declaration
    public double advanceTimeEachDynamicUpdate { get; set; }
    Property Value
    Type Description
    System.Double

    currentTime

    Declaration
    public double currentTime { get; set; }
    Property Value
    Type Description
    System.Double

    currentTimeOffsetToRealtimeSinceStartup

    Declaration
    public double currentTimeOffsetToRealtimeSinceStartup { get; set; }
    Property Value
    Type Description
    System.Double

    fixedUpdateIntervalInSeconds

    Declaration
    public double fixedUpdateIntervalInSeconds { get; set; }
    Property Value
    Type Description
    System.Double

    frameCount

    Declaration
    public int frameCount { get; set; }
    Property Value
    Type Description
    System.Int32

    onBeforeUpdate

    Declaration
    public Action<InputUpdateType> onBeforeUpdate { get; set; }
    Property Value
    Type Description
    Action<InputUpdateType>

    onDeviceDiscovered

    Declaration
    public Action<int, string> onDeviceDiscovered { get; set; }
    Property Value
    Type Description
    Action<System.Int32, System.String>

    onFocusChanged

    Declaration
    public Action<bool> onFocusChanged { get; set; }
    Property Value
    Type Description
    Action<System.Boolean>

    onShutdown

    Declaration
    public Action onShutdown { get; set; }
    Property Value
    Type Description
    Action

    onUpdate

    Declaration
    public InputUpdateDelegate onUpdate { get; set; }
    Property Value
    Type Description
    InputUpdateDelegate

    pollingFrequency

    Declaration
    public float pollingFrequency { get; set; }
    Property Value
    Type Description
    System.Single

    screenOrientation

    Declaration
    public ScreenOrientation screenOrientation { get; set; }
    Property Value
    Type Description
    ScreenOrientation

    screenSize

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

    updateMask

    Declaration
    public InputUpdateType updateMask { get; set; }
    Property Value
    Type Description
    InputUpdateType

    userAccountPairings

    Declaration
    public List<InputTestRuntime.PairedUser> userAccountPairings { get; }
    Property Value
    Type Description
    List<InputTestRuntime.PairedUser>

    Methods

    AllocateDeviceId()

    Declaration
    public int AllocateDeviceId()
    Returns
    Type Description
    System.Int32

    AssociateInputDeviceWithUser(Int32, UInt64, String, String)

    Declaration
    public void AssociateInputDeviceWithUser(int deviceId, ulong userHandle, string userName = null, string userId = null)
    Parameters
    Type Name Description
    System.Int32 deviceId
    System.UInt64 userHandle
    System.String userName
    System.String userId

    AssociateInputDeviceWithUser(InputDevice, UInt64, String, String)

    Declaration
    public void AssociateInputDeviceWithUser(InputDevice device, ulong userHandle, string userName = null, string userId = null)
    Parameters
    Type Name Description
    InputDevice device
    System.UInt64 userHandle
    System.String userName
    System.String userId

    DeviceCommand(Int32, InputDeviceCommand*)

    Declaration
    public long DeviceCommand(int deviceId, InputDeviceCommand*commandPtr)
    Parameters
    Type Name Description
    System.Int32 deviceId
    InputDeviceCommand* commandPtr
    Returns
    Type Description
    System.Int64

    Dispose()

    Declaration
    public void Dispose()

    Finalize()

    Declaration
    protected void Finalize()

    InvokeFocusChanged(Boolean)

    Declaration
    public void InvokeFocusChanged(bool newFocusState)
    Parameters
    Type Name Description
    System.Boolean newFocusState

    QueueEvent(IntPtr)

    Declaration
    public void QueueEvent(IntPtr ptr)
    Parameters
    Type Name Description
    IntPtr ptr

    ReportNewInputDevice(InputDeviceDescription, Int32, UInt64, String, String)

    Declaration
    public int ReportNewInputDevice(InputDeviceDescription description, int deviceId = 0, ulong userHandle = 0UL, string userName = null, string userId = null)
    Parameters
    Type Name Description
    InputDeviceDescription description
    System.Int32 deviceId
    System.UInt64 userHandle
    System.String userName
    System.String userId
    Returns
    Type Description
    System.Int32

    ReportNewInputDevice(String, Int32)

    Declaration
    public int ReportNewInputDevice(string deviceDescriptor, int deviceId = 0)
    Parameters
    Type Name Description
    System.String deviceDescriptor
    System.Int32 deviceId
    Returns
    Type Description
    System.Int32

    ReportNewInputDevice<TDevice>(Int32, UInt64, String, String)

    Declaration
    public int ReportNewInputDevice<TDevice>(int deviceId = 0, ulong userHandle = 0UL, string userName = null, string userId = null)where TDevice : InputDevice
    Parameters
    Type Name Description
    System.Int32 deviceId
    System.UInt64 userHandle
    System.String userName
    System.String userId
    Returns
    Type Description
    System.Int32
    Type Parameters
    Name Description
    TDevice

    SetDeviceCommandCallback(Int32, InputTestRuntime.DeviceCommandCallback)

    Declaration
    public void SetDeviceCommandCallback(int deviceId, InputTestRuntime.DeviceCommandCallback callback)
    Parameters
    Type Name Description
    System.Int32 deviceId
    InputTestRuntime.DeviceCommandCallback callback

    SetDeviceCommandCallback(InputDevice, InputTestRuntime.DeviceCommandCallback)

    Declaration
    public void SetDeviceCommandCallback(InputDevice device, InputTestRuntime.DeviceCommandCallback callback)
    Parameters
    Type Name Description
    InputDevice device
    InputTestRuntime.DeviceCommandCallback callback

    SetDeviceCommandCallback<TCommand>(Int32, TCommand)

    Declaration
    public void SetDeviceCommandCallback<TCommand>(int deviceId, TCommand result)where TCommand : struct, IInputDeviceCommandInfo
    Parameters
    Type Name Description
    System.Int32 deviceId
    TCommand result
    Type Parameters
    Name Description
    TCommand

    Update(InputUpdateType)

    Declaration
    public void Update(InputUpdateType type)
    Parameters
    Type Name Description
    InputUpdateType type

    See Also

    runtime
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023