Class InputRemoting
Makes the activity and data of an InputManager observable in message form.
Inheritance
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 |
---|---|
System.Boolean |
Methods
RemoveRemoteDevices(Int32)
Declaration
public void RemoveRemoteDevices(int participantId)
Parameters
Type | Name | Description |
---|---|---|
System.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 |
---|---|---|
System.IObserver<InputRemoting.Message> | observer |
Returns
Type | Description |
---|---|
System.IDisposable |