Interface IInputOwnershipSystem
Allows finding which account owns an input device and track when ownership changes.
Namespace: Unity.PlatformToolkit
Assembly: Unity.PlatformToolkit.dll
Syntax
public interface IInputOwnershipSystem
Remarks
Use InputOwnership capability to check if input ownership is supported.
Methods
GetOwner(object)
Get the owner of a given input device.
Declaration
IAccount GetOwner(object inputDevice)
Parameters
| Type | Name | Description |
|---|---|---|
| object | inputDevice | Input device, for which the owner is to be returned. |
Returns
| Type | Description |
|---|---|
| IAccount | Returns the owner of the given input device, or null if the device has no owner. |
See Also
GetOwner(IInputDevice)
Get the owner of a given input device.
Declaration
IAccount GetOwner(IInputDevice inputDevice)
Parameters
| Type | Name | Description |
|---|---|---|
| IInputDevice | inputDevice | Input device, for which the owner is to be returned. |
Returns
| Type | Description |
|---|---|
| IAccount | Returns the owner of the given input device, or null if the device has no owner. |
See Also
RegisterInputDeviceConverter<T>(Func<T, IInputDevice>)
Register converter, which converts input system specific input device into platform specific IInputDevice.
Declaration
void RegisterInputDeviceConverter<T>(Func<T, IInputDevice> converter)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<T, IInputDevice> | converter | Converter from input system device type T. |
Type Parameters
| Name | Description |
|---|---|
| T | Type which given converter can convert. Converter will be used for type T and any types derived from T, if a more specific converter is not available. |
See Also
Events
OnChange
Event invoked after one or more account to input pairings has changed. Pairing change occurs when:
- Input device previously paired to an account is paired to a different account or is unpaired.
- Input device previously paired to an account is disconnected.
- Input device that was unpaired is paired to an account.
- Input device is connected and paired to an account.
Declaration
event Action OnChange
Event Type
| Type | Description |
|---|---|
| Action |