XrDeviceSdkController
An abstract class in Root.Township, the global namespace.
Base for a device SDK controller (one per player mode): starts the SDK, makes the device lifecycle and creates input controllers for each hand. Client side.
- Listed in Global namespace: T to X
- Inherits or implements
IXrDeviceSdkController - Derived types
AutoCamDeviceController,FlyCamDeviceController,OpenXRDeviceController,SteamVRDeviceController
Constructors
| Member | What it is |
|---|---|
protected XrDeviceSdkController() | Creates a XrDeviceSdkController with default values. |
Fields
1 private and internal field
| Member | What it is |
|---|---|
private DeviceLifecycle deviceLifecycle | The DeviceLifecycle made by CreateInterface in StartDevice. The update calls are passed on to it. |
Properties
| Member | What it is |
|---|---|
static PlayerMode ActiveMode { get; } | The player mode the platform driver is running. |
abstract bool IsProvidingPosition { get; } | Whether this device tracks position. |
abstract PlayerMode Mode { get; } | The player mode this controller is for. |
Methods
| Member | What it is |
|---|---|
abstract DeviceInputController CreateController(PlayerInput controller) | Implemented per device: makes the input controller for one hand. |
abstract DeviceLifecycle CreateInterface(IPlatformPlayer player, IPlatformDevice platformDevice) | Implemented per device: makes the device lifecycle. |
void FixedUpdate() | Passes the physics step to the device lifecycle. |
void LateUpdate() | Passes late update to the device lifecycle. |
void SetDevicePlayer(IPlatformPlayer player) | Points the lifecycle at a player and gives each of its hands a new input controller. |
IEnumerator StartDevice(IPlatformPlayer player, IPlatformDevice platformDevice) (iterator) | Runs Start, makes the lifecycle and enables the SDK. |
void StopDevice() | Disables the SDK. |
void Update() | Passes update to the device lifecycle. |
protected abstract IEnumerator Start() | Implemented per device: starts the SDK, as a coroutine. |