/// <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 the pose has become valid or invalid. Should take a SteamVR_Action_Pose as a param</param> public void RemoveOnValidPoseChanged(SteamVR_Input_Sources inputSource, ValidPoseChangeHandler functionToStopCalling) { sourceMap[inputSource].onValidPoseChanged -= functionToStopCalling; }
/// <summary>Fires an event when the device now has a valid pose or no longer has a valid pose</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 the pose has become valid or invalid. Should take a SteamVR_Action_Pose as a param</param> public void AddOnValidPoseChanged(SteamVR_Input_Sources inputSource, ValidPoseChangeHandler functionToCall) { sourceMap[inputSource].onValidPoseChanged += functionToCall; }