Пример #1
0
        public void Init()
        {
            StaticMeshScript = FindObjectOfType <ViveSR_Experience_StaticMesh>();

            npcGenerator = GetComponent <ViveSR_Experience_NPCGenerator>();

            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>();
            PlayText = attachPointCanvas.transform.Find("TouchpadCanvas/PlayText").GetComponent <Text>();
            HintText = attachPointCanvas.transform.Find("HintText").GetComponent <Text>();

            PlayText.text = "[Load]";
            if (StaticMeshScript.GetSegmentationInfo(SceneUnderstandingObjectType.CHAIR).Count > 0)
            {
                PlayText.color = Color_Bright;
            }

            ViveSR_DualCameraRig.Instance.VirtualCamera.cullingMask &= ~(1 << LayerMask.NameToLayer("UI"));
            FindObjectOfType <ViveSR_PortalMgr>().TurnOnCamera();

            RaycastStartPoint = ViveSR_Experience.instance.AttachPoint.transform.Find("RaycastStartPoint").gameObject;

            ViveSR_Experience_ControllerDelegate.touchpadDelegate += handleTouchpad_MRChair;
        }
Пример #2
0
        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;
        }
Пример #3
0
 protected override void StartToDo()
 {
     Button                   = ViveSR_Experience_Demo.instance.ButtonScripts[MenuButton.EnableMesh];
     StaticMeshScript         = ViveSR_Experience_Demo.instance.StaticMeshScript;
     dartGeneratorMgr_Static  = ViveSR_Experience_Demo.instance.DartGeneratorMgrs[DartGeneratorIndex.ForStatic];
     dartGeneratorMgr_Dynamic = ViveSR_Experience_Demo.instance.DartGeneratorMgrs[DartGeneratorIndex.ForDynamic];
 }
        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());
        }
Пример #5
0
 protected override void StartToDo()
 {
     StaticMeshScript = ViveSR_Experience_Demo.instance.StaticMeshScript;
 }
 protected override void StartToDo()
 {
     PortalScript     = ViveSR_Experience_Demo.instance.PortalScript;
     StaticMeshScript = ViveSR_Experience_Demo.instance.StaticMeshScript;
     EnableButton(StaticMeshScript.CheckChairExist());
 }
Пример #7
0
        //0 = all

        public void Init()
        {
            StaticMeshScript = FindObjectOfType <ViveSR_Experience_StaticMesh>();
            Init_Start();
        }
Пример #8
0
 private void Awake()
 {
     StaticMeshScript = FindObjectOfType <ViveSR_Experience_StaticMesh>();
     SwitchModeScript = StaticMeshScript.SwitchModeScript;
     SemanticDrawer   = FindObjectOfType <ViveSR_Experience_SemanticDrawer>();
 }
 private void Awake()
 {
     StaticMeshScript = FindObjectOfType <ViveSR_Experience_StaticMesh>();
     lightRed         = new Color(1f, 0.5f, 0.5f, 1f);
     lightGreen       = new Color(0.5f, 1f, 0.5f, 1f);
 }