Ejemplo n.º 1
0
        void SwitchMeshDisplayMode(MeshDisplayMode meshDisplayMode)
        {
            this.meshDisplayMode = meshDisplayMode;

            switch (meshDisplayMode)
            {
            case MeshDisplayMode.None:      //Hidden
                StaticMeshScript.SwitchModeScript.SwithMode(DualCameraDisplayMode.MIX);
                StaticMeshScript.RenderModelMesh(false);
                HintText.text = "See-Through";
                break;

            case MeshDisplayMode.Collider:
                StaticMeshScript.SwitchShowCollider(ShowMode.All);
                HintText.text = "View Colliders";
                break;

            case MeshDisplayMode.VRMode:
                StaticMeshScript.SwitchShowCollider(ShowMode.None);
                StaticMeshScript.SwitchModeScript.SwithMode(DualCameraDisplayMode.VIRTUAL);
                StaticMeshScript.RenderModelMesh(true);
                HintText.text = "View Texture";
                break;
            }
        }
Ejemplo n.º 2
0
 void SwitchActionMode_ToMeshControl()
 {
     dartGeneratorMgr.gameObject.SetActive(true);
     ViveSR_Experience_ControllerDelegate.touchpadDelegate -= HandleTouchpad_ColliderOperation;
     ViveSR_Experience_ControllerDelegate.touchpadDelegate += HandleTouchpad_MeshOperation;
     StaticMeshScript.SwitchModeScript.SwithMode(DualCameraDisplayMode.MIX);
     StaticMeshScript.SwitchShowCollider(ShowMode.None);
     SetUI_ToMeshControl();
 }
        public override void ExecuteToDo()
        {
            if (isOn)
            {
                ViveSR_Experience_Demo.instance.SubButtonScripts[SubMenuButton.EnableMesh_Dynamic].ForceExcute(false);
                ViveSR_Experience_Demo.instance.SubButtonScripts[SubMenuButton.EnableMesh_StaticVR].ForceExcute(false);

                StaticMeshScript.LoadMesh(true, false,
                                          () => {
                    ViveSR_Experience_Demo.instance.Rotator.RenderButtons(false);
                    SubMenu.RenderSubBtns(false);
                    disabled = true;
                    ViveSR_Experience_HintMessage.instance.SetHintMessage(hintType.onHeadSet, "[Enable Mesh]\nLoading...", false);
                },
                                          () => {
                    ViveSR_Experience_Demo.instance.Rotator.RenderButtons(true);
                    SubMenu.RenderSubBtns(true);
                    disabled = false;
                    ViveSR_Experience_HintMessage.instance.SetHintMessage(hintType.onController, "", false);
                    ViveSR_Experience_HintMessage.instance.SetHintMessage(hintType.onHeadSet, "Mesh Loaded!", true);
                    dartGeneratorMgr_static.gameObject.SetActive(true);
                    ViveSR_Experience_ControllerDelegate.triggerDelegate += HandleTrigger;
                    ViveSR_Experience_ControllerDelegate.gripDelegate    += HandleGrip;
                }
                                          );
            }
            else
            {
                StaticMeshScript.SwitchShowCollider(ShowMode.None);
                StaticMeshScript.LoadMesh(false);
                dartGeneratorMgr_static.gameObject.SetActive(false);
                ViveSR_Experience_ControllerDelegate.triggerDelegate -= HandleTrigger;
                ViveSR_Experience_ControllerDelegate.gripDelegate    -= HandleGrip;
                dartGeneratorMgr_static.DestroyObjs();
            }
        }