/// <summary>Fires an event when the tracking of the device has changed</summary> /// <param name="inputSource">The device you would like to add an event to. Any if the action is not device specific.</param> /// <param name="functionToCall">The method you would like to be called when tracking has changed. Should take a SteamVR_Action_Pose as a param</param> public void AddOnTrackingChanged(SteamVR_Input_Sources inputSource, TrackingChangeHandler functionToCall) { sourceMap[inputSource].onTrackingChanged += functionToCall; }
/// <summary>Stops executing the function setup by the corresponding AddListener</summary> /// <param name="inputSource">The device you would like to remove an event from. Any if the action is not device specific.</param> /// <param name="functionToStopCalling">The method you would like to stop calling when tracking has changed. Should take a SteamVR_Action_Pose as a param</param> public void RemoveOnTrackingChanged(SteamVR_Input_Sources inputSource, TrackingChangeHandler functionToStopCalling) { sourceMap[inputSource].onTrackingChanged -= functionToStopCalling; }