void ExportModel_done() { StaticMeshScript.GenerateHintLocators(SegResults); PlayText.text = "[Load]"; SetColor(Color_Bright, ScanText, PlayText); SetColor(Color_Dark, StopText, SaveText); }
public override void ActionToDo() { ViveSR_Experience_Demo.instance.realWorldFloor.SetActive(isOn); if (isOn) { //wait for tutorial segmentation handler to reaction on UI before turning it off this.DelayOneFrame(() => { ViveSR_Experience_Demo.instance.Rotator.RenderButtons(false); ViveSR_Experience_Demo.instance.Tutorial.ToggleTutorial(false); }); ActionSequence = ViveSR_Experience_ActionSequence.CreateActionSequence(gameObject); ActionSequence.AddAction(() => StaticMeshScript.LoadMesh(true, false, () => ViveSR_Experience_HintMessage.instance.SetHintMessage(hintType.onHeadSet, "Loading Mesh...", false), () => { ViveSR_Experience_HintMessage.instance.SetHintMessage(hintType.onHeadSet, "Mesh Loaded!", true, 0.5f); ActionSequence.ActionFinished(); } )); ActionSequence.AddAction(() => { ViveSR_Experience_Demo.instance.Rotator.RenderButtons(true); ViveSR_Experience_Demo.instance.Tutorial.ToggleTutorial(true); SegResults = StaticMeshScript.GetSegmentationInfo(SceneUnderstandingObjectType.CHAIR); StaticMeshScript.GenerateHintLocators(SegResults); LoadChair(); ViveSR_Experience_ControllerDelegate.touchpadDelegate += handleTouchpad_Play; ActionSequence.ActionFinished(); }); ActionSequence.StartSequence(); } else { ActionSequence.StopSequence(); StaticMeshScript.LoadMesh(false); ViveSR_Experience_ControllerDelegate.touchpadDelegate -= handleTouchpad_Play; ViveSR_DualCameraRig.Instance.VirtualCamera.cullingMask |= (1 << LayerMask.NameToLayer("UI")); PortalScript.PortalManager.TurnOffCamera(); PortalScript.PortalManager.gameObject.SetActive(false); StaticMeshScript.ClearHintLocators(); npcGenerator.ClearScene(); portalCamerasDisabledEvent.Invoke(); } }
void TestSegmentationResult_done() { List <SceneUnderstandingObjects.Element> SegResults = StaticMeshScript.GetSegmentationInfo(SceneUnderstandingObjectType.CHAIR); StaticMeshScript.GenerateHintLocators(SegResults); chairNum = StaticMeshScript.GetSegmentationInfo(SceneUnderstandingObjectType.CHAIR).Count; ViveSR_Experience_Demo.instance.ButtonScripts[MenuButton.Segmentation].EnableButton(chairNum > 0); StaticMeshScript.SetSegmentation(false); StaticMeshScript.ExportModel(UpdatePercentage_Mesh, ExportModel_done); }