void OnDisable() => InputAsset.Disable();
private void OnDisable() { settings.Disable(); }
private void OnDisable() { _ipt.Disable(); }
private void OnDisable() { inputActions["Tap"].started -= Tap_started; inputActions["Tap"].canceled -= Tap_canceled; inputActions.Disable(); }
void OnStateDataChanged(UIStateData stateData) { if (m_ToolbarsEnabled != stateData.toolbarsEnabled) { if (stateData.toolbarsEnabled) { if (stateData.navigationState.navigationMode == NavigationMode.Orbit) { m_Camera.enabled = true; m_InputActionAsset.Enable(); } else { m_Camera.enabled = false; m_InputActionAsset.Disable(); } } else { m_Camera.enabled = false; m_InputActionAsset.Disable(); } m_ResetButton.button.interactable = stateData.toolbarsEnabled; m_ToolbarsEnabled = stateData.toolbarsEnabled; } if (m_CachedNavigationState != stateData.navigationState) { m_Camera.enabled = stateData.navigationState.freeFlyCameraEnabled; m_FocusButton.enabled = stateData.navigationState.freeFlyCameraEnabled; if (stateData.navigationState.orbitEnabled) { m_InputActionAsset["Orbit Action"].Enable(); } else { m_InputActionAsset["Orbit Action"].Disable(); } if (stateData.navigationState.panEnabled) { m_InputActionAsset["Pan Mode Action"].Enable(); m_InputActionAsset["Pan Gesture Action"].Enable(); m_InputActionAsset["Pan Gesture Action"].Enable(); m_InputActionAsset["Pan Action"].Enable(); m_InputActionAsset["Quick Pan Action"].Enable(); } else { m_InputActionAsset["Pan Mode Action"].Disable(); m_InputActionAsset["Pan Gesture Action"].Disable(); m_InputActionAsset["Pan Gesture Action"].Disable(); m_InputActionAsset["Pan Action"].Disable(); m_InputActionAsset["Quick Pan Action"].Disable(); } if (stateData.navigationState.zoomEnabled) { m_InputActionAsset["Zoom Mode Action"].Enable(); m_InputActionAsset["Zoom Gesture Action"].Enable(); m_InputActionAsset["Zoom Gesture Action"].Enable(); m_InputActionAsset["Zoom Action"].Enable(); m_InputActionAsset["Quick Zoom Action"].Enable(); } else { m_InputActionAsset["Zoom Mode Action"].Disable(); m_InputActionAsset["Zoom Gesture Action"].Disable(); m_InputActionAsset["Zoom Gesture Action"].Disable(); m_InputActionAsset["Zoom Action"].Disable(); m_InputActionAsset["Quick Zoom Action"].Disable(); } if (stateData.navigationState.moveEnabled) { m_InputActionAsset["Moving Action"].Enable(); } else { m_InputActionAsset["Moving Action"].Disable(); } if (stateData.navigationState.worldOrbitEnabled) { m_InputActionAsset["Quick WorldOrbit Action"].Enable(); } else { m_InputActionAsset["Quick WorldOrbit Action"].Disable(); } if (stateData.navigationState.teleportEnabled) { m_InputActionAsset["Teleport Action"].Enable(); } else { m_InputActionAsset["Teleport Action"].Disable(); } if (m_CachedNavigationMode != stateData.navigationState.navigationMode) { if (stateData.navigationState.navigationMode == NavigationMode.Orbit) { StartCoroutine(ResetHomeView()); } m_CachedNavigationMode = stateData.navigationState.navigationMode; } m_GizmoCube.SetActive(stateData.navigationState.gizmoEnabled); /* * TODO: Temporary fix till next MARS Update. This code will make sure that the cube stay hidden in AR mode. */ GizmoController gizmoController = GetComponent <GizmoController>(); if (!stateData.navigationState.gizmoEnabled) { gizmoController.HideGizmo(); } else { gizmoController.ShowGizmo(); } m_CachedNavigationState = stateData.navigationState; } if (m_CachedToolType == null || m_CachedToolType != stateData.toolState.activeTool) { m_CachedToolType = stateData.toolState.activeTool; } if (m_CachedCameraOptionData != stateData.cameraOptionData) { switch (stateData.cameraOptionData.cameraViewType) { case CameraViewType.Top: OnTopView(); break; case CameraViewType.Left: OnLeftView(); break; case CameraViewType.Right: OnRightView(); break; } m_CachedCameraOptionData = stateData.cameraOptionData; } if (m_CachedInfoType != stateData.toolState.infoType) { m_CachedInfoType = stateData.toolState.infoType; } }
private void OnDisable() { controls.Disable(); }
public void Disable(Action <object, InputActionChange> action) { InputSystem.onActionChange -= action; _asset.Disable(); }
public void OnDisable() { playerControlsAsset.Disable(); }
void OnStateDataChanged(UIStateData stateData) { if (m_ToolbarsEnabled != stateData.toolbarsEnabled) { if (stateData.toolbarsEnabled) { if (stateData.navigationState.navigationMode == NavigationMode.Orbit) { m_Camera.enabled = true; m_InputActionAsset.Enable(); } else { m_Camera.enabled = false; m_InputActionAsset.Disable(); } } else { m_Camera.enabled = false; m_InputActionAsset.Disable(); } m_ResetButton.button.interactable = stateData.toolbarsEnabled; m_ToolbarsEnabled = stateData.toolbarsEnabled; } if (m_CachedNavigationMode != stateData.navigationState.navigationMode) { if (stateData.navigationState.navigationMode == NavigationMode.Orbit) { m_Camera.enabled = true; m_InputActionAsset.Enable(); StartCoroutine(ResetHomeView()); m_ResetButton.button.interactable = stateData.toolbarsEnabled; // only disable home button on AR mode } else if (stateData.navigationState.navigationMode == NavigationMode.AR) { m_Camera.enabled = false; m_InputActionAsset.Disable(); m_ResetButton.button.interactable = false; } else { m_Camera.enabled = false; m_InputActionAsset.Disable(); m_ResetButton.button.interactable = stateData.toolbarsEnabled; } m_CachedNavigationMode = stateData.navigationState.navigationMode; } if (m_CachedToolType == null || m_CachedToolType != stateData.toolState.activeTool) { m_CachedToolType = stateData.toolState.activeTool; } if (m_PreviousToolType == null && !IsTemporaryTool(stateData.toolState.activeTool)) { m_PreviousToolType = stateData.toolState.activeTool; } else if (stateData.toolState.activeTool == ToolType.None) { m_PreviousToolType = ToolType.OrbitTool; } }
private void OnDisable() { input.Disable(); }
void OnDisable() { inputActionAsset.Disable(); }
void OnDisable() => asset.Disable();