Class InputRemoting
Makes the activity and data of an InputManager observable in message form.
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
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
Explicit Interface Implementations
IObserver<InputRemoting.Message>.OnCompleted()
Declaration
void IObserver<InputRemoting.Message>.OnCompleted()
Implements
IObserver<InputRemoting.Message>.OnError(Exception)
Declaration
void IObserver<InputRemoting.Message>.OnError(Exception error)
Parameters
Type | Name | Description |
---|---|---|
Exception | error |
Implements
IObserver<InputRemoting.Message>.OnNext(InputRemoting.Message)
Declaration
void IObserver<InputRemoting.Message>.OnNext(InputRemoting.Message msg)
Parameters
Type | Name | Description |
---|---|---|
InputRemoting.Message | msg |