private void OnSourceChanged(InputSourceGamepad arg1, InputSourceGamepadBase newSource) { if (newSource != null) { m_SourceName.SetText(newSource.GetType().ToString()); } else { m_SourceName.SetText("No Gamepad Source"); } m_SourceName.Highlight(); }
void Start() { gamepadSource = InputSources.Instance.gamepad; gamepadSource.gamepadSource.bButtonState.OnChanged += DeactivateEvent; }
private void OnStartButtonChanged(InputSourceGamepad arg1, bool newState) { string state = newState ? "Pressed" : "Released"; AddMessage(string.Format("Start Button {0}", state)); }