protected virtual void Awake() { TrackedObject obj = GetComponent <TrackedObject>(); if (obj != null) { controller = obj.source; } if (controller == ControllerType.None) { m_Input = ControllerInputManager.GetInput(name); } else { m_Input = ControllerInputManager.GetInput(controller); } // if (m_Input != null) { for (int i = 0, imax = axes.Length; i < imax; ++i) { axes[i].Awake(m_Input); } for (int i = 0, imax = buttons.Length; i < imax; ++i) { buttons[i].Awake(m_Input); } } }
internal XDeviceControllerProvider() { m_ControllerInputs = new ControllerInput[2] { ControllerInputManager.GetInput(ControllerType.LeftController), ControllerInputManager.GetInput(ControllerType.RightController), }; }
protected virtual void Start() { m_Input = ControllerInputManager.GetInput(ControllerType.Hmd); }