コード例 #1
0
        void OnFlyButtonClicked()
        {
            Dispatcher.Dispatch(CloseAllDialogsAction.From(null));

            var currentNavigationMode = m_NavigationModeSelector.GetValue();

            if (currentNavigationMode == SetNavigationModeAction.NavigationMode.Orbit ||
                currentNavigationMode == SetNavigationModeAction.NavigationMode.Fly)
            {
                return;
            }

            m_WalkButton.button.interactable = true;

            CheckDeviceCapability(m_DeviceCapabilitySelector.GetValue());

            Dispatcher.Dispatch(ShowModelAction.From(true));

            Dispatcher.Dispatch(SetAREnabledAction.From(false));

            Dispatcher.Dispatch(SetVREnableAction.From(false));

            Dispatcher.Dispatch(ClearStatusAction.From(true));
            Dispatcher.Dispatch(ClearStatusAction.From(false));
            Dispatcher.Dispatch(SetInstructionMode.From(false));

            if (currentNavigationMode != SetNavigationModeAction.NavigationMode.Walk)
            {
                Dispatcher.Dispatch(UnloadSceneActions <Project> .From(m_SceneDictionary[currentNavigationMode]));
                Dispatcher.Dispatch(SetCameraViewTypeAction.From(SetCameraViewTypeAction.CameraViewType.Default));
            }

            Dispatcher.Dispatch(SetActiveToolBarAction.From(SetActiveToolBarAction.ToolbarType.OrbitSidebar));

            Dispatcher.Dispatch(SetThemeAction.From(ThemeController.k_Default));

            Dispatcher.Dispatch(SetWalkEnableAction.From(false));

            Dispatcher.Dispatch(EnableAllNavigationAction.From(true));
            Dispatcher.Dispatch(SetNavigationModeAction.From(SetNavigationModeAction.NavigationMode.Orbit));
            Dispatcher.Dispatch(SetShowScaleReferenceAction.From(false));

            Dispatcher.Dispatch(LoadSceneActions <Project> .From(m_SceneDictionary[SetNavigationModeAction.NavigationMode.Orbit]));

            Dispatcher.Dispatch(EnableBimFilterAction.From(true));
            Dispatcher.Dispatch(EnableSceneSettingsAction.From(true));
            Dispatcher.Dispatch(EnableSunStudyAction.From(true));
            Dispatcher.Dispatch(EnableMarkerSettingsAction.From(true));

            var arToolStateData = SetARToolStateAction.SetARToolStateData.defaultData;

            arToolStateData.selectionEnabled   = true;
            arToolStateData.measureToolEnabled = true;
            Dispatcher.Dispatch(SetARToolStateAction.From(arToolStateData));
        }
コード例 #2
0
        void ActivateVRmode()
        {
            m_WalkButton.button.interactable = false;
            m_VRButton.button.interactable   = false;
            var currentNavigationMode = m_NavigationModeSelector.GetValue();

            Dispatcher.Dispatch(SetAREnabledAction.From(false));

            Dispatcher.Dispatch(ClearStatusAction.From(true));
            Dispatcher.Dispatch(ClearStatusAction.From(false));

            Dispatcher.Dispatch(SetInstructionMode.From(false));

            if (currentNavigationMode != SetNavigationModeAction.NavigationMode.Walk)
            {
                Dispatcher.Dispatch(UnloadSceneActions <Project> .From(m_SceneDictionary[currentNavigationMode]));
            }

            Dispatcher.Dispatch(CloseAllDialogsAction.From(null));

            Dispatcher.Dispatch(SetActiveToolBarAction.From(SetActiveToolBarAction.ToolbarType.VRSidebar));

            Dispatcher.Dispatch(SetThemeAction.From(ThemeController.k_VROpaque));

            Dispatcher.Dispatch(SetWalkEnableAction.From(false));

            Dispatcher.Dispatch(SetVREnableAction.From(true));

            Dispatcher.Dispatch(EnableAllNavigationAction.From(true));
            Dispatcher.Dispatch(SetNavigationModeAction.From(SetNavigationModeAction.NavigationMode.VR));
            Dispatcher.Dispatch(SetShowScaleReferenceAction.From(false));

            Dispatcher.Dispatch(LoadSceneActions <Project> .From(m_SceneDictionary[SetNavigationModeAction.NavigationMode.VR]));

            Dispatcher.Dispatch(EnableBimFilterAction.From(true));
            Dispatcher.Dispatch(EnableSceneSettingsAction.From(true));
            Dispatcher.Dispatch(EnableSunStudyAction.From(true));
            Dispatcher.Dispatch(EnableMarkerSettingsAction.From(true));

            Dispatcher.Dispatch(ToggleMeasureToolAction.From(ToggleMeasureToolAction.ToggleMeasureToolData.defaultData));
        }