/// <summary> /// Cleans up the component. /// </summary> void OnDestroy() { #if PLATFORM_LUMIN MLHeadTracking.UnregisterOnHeadTrackingMapEvent(OnHeadTrackingMapEvent); MLHeadTracking.Stop(); MLInput.OnControllerButtonDown -= OnButtonDown; #endif }
/// <summary> /// Cleans up the component. /// </summary> void OnDestroy() { #if PLATFORM_LUMIN MLInput.OnControllerTouchpadGestureStart -= OnTouchpadGestureStart; MLInput.OnTriggerDown -= OnTriggerDown; MLInput.OnControllerButtonDown -= OnButtonDown; MLHeadTracking.UnregisterOnHeadTrackingMapEvent(OnHeadTrackingMapEvent); MLHeadTracking.Stop(); #endif }
/// <summary> /// Clean up. /// Destroys all planes instances created. /// </summary> void OnDestroy() { #if PLATFORM_LUMIN _planesBehavior.OnQueryPlanesResult -= HandleOnQueriedPlanes; MLHeadTracking.UnregisterOnHeadTrackingMapEvent(HandleOnHeadTrackingMapEvent); MLHeadTracking.Stop(); #endif DestroyPlanes(); DestroyBoundaries(); }
/// <summary> /// Stops the MLPersistentCoordinateFrames API and unregisters from events and /// </summary> void OnDestroy() { #if PLATFORM_LUMIN PCFVisualizer.OnFindAllPCFs -= HandleOnFindAllPCFs; MLPersistentCoordinateFrames.OnLocalized -= HandleOnLocalized; MLPersistentCoordinateFrames.Stop(); MLHeadTracking.Stop(); MLInput.OnControllerButtonDown -= HandleControllerButtonDown; MLInput.OnControllerTouchpadGestureStart -= HandleTouchpadGestureStart; MLInput.OnControllerTouchpadGestureContinue -= HandleTouchpadGestureContinue; MLInput.OnControllerTouchpadGestureEnd -= HandleTouchpadGestureEnd; #endif }