void OnChange(SteamVR_Action_In action) //Creates and deploys an Event on any Input action { STKEventSender sender = GetComponent <STKEventSender>(); sender.SetEventValue("Name", action.GetShortName()); if (action.GetType() == typeof(SteamVR_Action_Boolean)) { SteamVR_Action_Boolean v = (SteamVR_Action_Boolean)action; sender.SetEventValue("boolValue", v.GetState(SteamVR_Input_Sources.Any)); } else if (action.GetType() == typeof(SteamVR_Action_Single)) { SteamVR_Action_Single v = (SteamVR_Action_Single)action; sender.SetEventValue("singleValue", v.GetAxis(SteamVR_Input_Sources.Any)); } else if (action.GetType() == typeof(SteamVR_Action_Vector2)) { SteamVR_Action_Vector2 v = (SteamVR_Action_Vector2)action; sender.SetEventValue("vector2Value", v.GetAxis(SteamVR_Input_Sources.Any)); } else if (action.GetType() == typeof(SteamVR_Action_Vector3)) { SteamVR_Action_Vector3 v = (SteamVR_Action_Vector3)action; sender.SetEventValue("vector3Value", v.GetAxis(SteamVR_Input_Sources.Any)); } sender.Deploy(); }