private void UnregisterCallbacks() { FoveManager.UnregisterInterface(this); FoveManager.PoseUpdate.RemoveListener(UpdatePoseData); FoveManager.EyeProjectionUpdate.RemoveListener(UpdateGazeMatrices); FoveManager.EyePositionUpdate.RemoveListener(UpdateEyePosition); FoveManager.GazeUpdate.RemoveListener(UpdateGaze); }
virtual protected void OnDisable() { FoveManager.UnregisterInterface(this); FoveManager.PoseUpdate.RemoveListener(UpdatePoseData); FoveManager.EyeProjectionUpdate.RemoveListener(UpdateGazeMatrices); FoveManager.EyePositionUpdate.RemoveListener(UpdateEyePosition); FoveManager.GazeUpdate.RemoveListener(UpdateGaze); }
virtual protected void OnDisable() { FoveManager.UnregisterInterface(this); FoveManager.AddInUpdate -= UpdateData; if (registerCameraObject) { RemoveCameraObject(); } }
private void RecreateLayer() { FoveManager.UnregisterInterface(this); var createInfo = new CompositorLayerCreateInfo { alphaMode = AlphaMode.Auto, disableDistortion = disableDistortion, disableFading = disableFading, disableTimewarp = disableTimewarp, type = layerType }; FoveManager.RegisterInterface(createInfo, this); }