void Stop() { if (!ViveSR_RigidReconstruction.IsScanning) { return; } StaticMeshScript.EnableDepthProcessingAndScanning(false); TriggerCanvas.SetActive(true); if (StaticMeshScript.CheckModelFileExist() && !StaticMeshScript.CheckModelLoaded()) { LoadText.color = BrightColor; } if (StaticMeshScript.CheckModelLoaded()) { StaticMeshScript.LoadMesh(true); } ScanText.color = BrightColor; StopText.color = OriginalColor; SaveText.color = OriginalColor; GripCanvas.SetActive(StaticMeshScript.CheckModelLoaded()); RigidReconstruction.SRWork_Rigid_Reconstruciton.UnregisterDataErrorHandler((int)Error.GPU_MEMORY_FULL); }
public void Init() { ViveSR_Experience.instance.ErrorHandlerScript.GPUMemoryFullControlPanel.AbortButton.onClick.AddListener(GPUMemoryFull_Abort); ViveSR_Experience.instance.ErrorHandlerScript.GPUMemoryFullControlPanel.SaveButton.onClick.AddListener(Save); StaticMeshScript = GetComponent <ViveSR_Experience_StaticMesh>(); GameObject attachPointCanvas = ViveSR_Experience.instance.AttachPoint.transform.GetChild(ViveSR_Experience.instance.AttachPointIndex).transform.gameObject; ScanText = attachPointCanvas.transform.Find("TouchpadCanvas/ScanText").GetComponent <Text>(); StopText = attachPointCanvas.transform.Find("TouchpadCanvas/StopText").GetComponent <Text>(); SaveText = attachPointCanvas.transform.Find("TouchpadCanvas/SaveText").GetComponent <Text>(); LoadText = attachPointCanvas.transform.Find("TouchpadCanvas/LoadText").GetComponent <Text>(); HintText = attachPointCanvas.transform.Find("HintText").GetComponent <Text>(); DartText = attachPointCanvas.transform.Find("TriggerCanvas/TriggerText").GetComponent <Text>(); GripText = attachPointCanvas.transform.Find("GripCanvas/GripText").GetComponent <Text>(); TriggerCanvas = attachPointCanvas.transform.Find("TriggerCanvas").gameObject; GripCanvas = attachPointCanvas.transform.Find("GripCanvas").gameObject; LoadText.color = StaticMeshScript.CheckModelFileExist() ? BrightColor : OriginalColor; ViveSR_RigidReconstructionRenderer.LiveMeshDisplayMode = ReconstructionDisplayMode.ADAPTIVE_MESH; ViveSR_Experience_ControllerDelegate.touchpadDelegate += HandleTouchpad_MeshOperation; ViveSR_Experience_ControllerDelegate.triggerDelegate += HandleTrigger_SetDartControl; dartPlaceMentmode = dartGeneratorMgr.dartPlacementMode; }
void ExportModel_done() { if (OnMeshSaved != null) { OnMeshSaved.Invoke(); } ViveSR_Experience_Demo.instance.Rotator.RenderButtons(true); SubMenu.RenderSubBtns(true); isOn = false; //Disable the [Save] button. SubMenu.subBtnScripts[ThisButtonTypeNum].isOn = false; SubMenu.subBtnScripts[ThisButtonTypeNum].EnableButton(false); //Enable the [Scan] button. ViveSR_Experience_Demo.instance.SubButtonScripts[SubMenuButton._3DPreview_Scan].ForceExcute(false); ViveSR_Experience_Demo.instance.SubButtonScripts[SubMenuButton._3DPreview_Scan].EnableButton(true); ViveSR_Experience_HintMessage.instance.SetHintMessage(hintType.onController, "", false); ViveSR_Experience_HintMessage.instance.SetHintMessage(hintType.onHeadSet, "Mesh & Chair Data Saved!", true); //[Enable Mesh] is available. if (StaticMeshScript.CheckModelFileExist()) { ViveSR_Experience_Demo.instance.SubButtonScripts[SubMenuButton.EnableMesh_StaticMR].EnableButton(true); ViveSR_Experience_Demo.instance.SubButtonScripts[SubMenuButton.EnableMesh_StaticVR].EnableButton(true); } StaticMeshScript.ClearHintLocators(); }
protected override void StartToDo() { StaticMeshScript = ViveSR_Experience_Demo.instance.StaticMeshScript; ThisButtonTypeNum = (int)SubBtnType; dartGeneratorMgr_static = ViveSR_Experience_Demo.instance.DartGeneratorMgrs[DartGeneratorIndex.ForStatic]; EnableButton(StaticMeshScript.CheckModelFileExist()); }
public void Init() { GameObject attachPointCanvas = ViveSR_Experience.instance.AttachPoint.transform.GetChild(ViveSR_Experience.instance.AttachPointIndex).transform.gameObject; ScanText = attachPointCanvas.transform.Find("TouchpadCanvas/ScanText").GetComponent <Text>(); StopText = attachPointCanvas.transform.Find("TouchpadCanvas/StopText").GetComponent <Text>(); SaveText = attachPointCanvas.transform.Find("TouchpadCanvas/SaveText").GetComponent <Text>(); LoadText = attachPointCanvas.transform.Find("TouchpadCanvas/LoadText").GetComponent <Text>(); HintText = attachPointCanvas.transform.Find("HintText").GetComponent <Text>(); DartText = attachPointCanvas.transform.Find("TriggerCanvas/TriggerText").GetComponent <Text>(); GripText = attachPointCanvas.transform.Find("GripCanvas/GripText").GetComponent <Text>(); TriggerCanvas = attachPointCanvas.transform.Find("TriggerCanvas").gameObject; GripCanvas = attachPointCanvas.transform.Find("GripCanvas").gameObject; TriggerCanvas.SetActive(false); GripCanvas.SetActive(false); LoadText.color = StaticMeshScript.CheckModelFileExist() ? BrightColor : OriginalColor; TileSpawnerScript.RaycastStartPoint = ViveSR_Experience.instance.AttachPoint.transform.Find("RaycastStartPoint").gameObject; ViveSR_RigidReconstructionRenderer.LiveMeshDisplayMode = ReconstructionDisplayMode.ADAPTIVE_MESH; ViveSR_Experience_ControllerDelegate.touchpadDelegate += HandleTouchpad_MeshOperation; dartPlaceMentmode = dartGeneratorMgr.dartPlacementMode; }