void SetDevice(InputDevice device, bool add = true) { uiController?.SetDevice(device, add); switch (device) { case Mouse mouse: m_mouse = add ? mouse : null; return; case Keyboard keyboard: m_keyboard = add ? keyboard : null; return; case Touchscreen screen: m_screen = add ? screen : null; return; case Gamepad pad: m_gamepad = add ? pad : null; return; case Gyroscope gyroscope: m_gyroscpe = add ? gyroscope : null; return; case TrackedDevice tracker: m_tracker = add ? tracker : null; return; #if URS_USE_AR_SUBSYSTEMS case HandheldARInputDevice handheld: m_handheld = handheld; return; #endif } }
/// <inheritdoc /> public override void MakeCurrent() { base.MakeCurrent(); current = this; }