Class InputRemoting | Input System | 1.0.2
docs.unity.cn
    Show / Hide Table of Contents

    Class InputRemoting

    Makes the activity and data of an InputManager observable in message form.

    Inheritance
    Object
    InputRemoting
    Namespace: UnityEngine.InputSystem
    Syntax
    public sealed class InputRemoting : IObservable<InputRemoting.Message>, IObserver<InputRemoting.Message>
    Remarks

    Can act as both the sender and receiver of these message so the flow is fully bidirectional, i.e. the InputManager on either end can mirror its layouts, devices, and events over to the other end. This permits streaming input not just from the player to the editor but also feeding input from the editor back into the player.

    Remoting sits entirely on top of the input system as an optional piece of functionality. In development players and the editor, we enable it automatically but in non-development players it has to be explicitly requested by the user.

    To see devices and input from players in the editor, open the Input Debugger through "Windows >> Input Debugger".

    Properties

    sending

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

    Methods

    RemoveRemoteDevices(Int32)

    Declaration
    public void RemoveRemoteDevices(int participantId)
    Parameters
    Type Name Description
    Int32 participantId

    StartSending()

    Start sending messages for data and activity in the local input system to observers.

    Declaration
    public void StartSending()
    See Also
    sending
    StopSending()

    StopSending()

    Declaration
    public void StopSending()

    Subscribe(IObserver<InputRemoting.Message>)

    Declaration
    public IDisposable Subscribe(IObserver<InputRemoting.Message> observer)
    Parameters
    Type Name Description
    IObserver<InputRemoting.Message> observer
    Returns
    Type Description
    IDisposable
    Implements
    IObservable<T>.Subscribe(IObserver<T>)

    Explicit Interface Implementations

    IObserver<InputRemoting.Message>.OnCompleted()

    Declaration
    void IObserver<InputRemoting.Message>.OnCompleted()
    Implements
    IObserver<T>.OnCompleted()

    IObserver<InputRemoting.Message>.OnError(Exception)

    Declaration
    void IObserver<InputRemoting.Message>.OnError(Exception error)
    Parameters
    Type Name Description
    Exception error
    Implements
    IObserver<T>.OnError(Exception)

    IObserver<InputRemoting.Message>.OnNext(InputRemoting.Message)

    Declaration
    void IObserver<InputRemoting.Message>.OnNext(InputRemoting.Message msg)
    Parameters
    Type Name Description
    InputRemoting.Message msg
    Implements
    IObserver<T>.OnNext(T)

    See Also

    remoting
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 22 January 2021