Ejemplo n.º 1
0
 private void Start()
 {
     m_BlinkVisualsGO = U.Object.Instantiate(m_BlinkVisualsPrefab, rayOrigin);
     m_BlinkVisuals   = m_BlinkVisualsGO.GetComponentInChildren <BlinkVisuals>();
     m_BlinkVisualsGO.transform.parent        = rayOrigin;
     m_BlinkVisualsGO.transform.localPosition = Vector3.zero;
     m_BlinkVisualsGO.transform.localRotation = Quaternion.identity;
 }
Ejemplo n.º 2
0
 private void Start()
 {
     m_BlinkVisualsGO       = U.Object.Instantiate(m_BlinkVisualsPrefab, rayOrigin);
     m_BlinkVisuals         = m_BlinkVisualsGO.GetComponentInChildren <BlinkVisuals>();
     m_BlinkVisuals.enabled = false;
     m_BlinkVisuals.showValidTargetIndicator  = false;        // We don't define valid targets, so always show green
     m_BlinkVisualsGO.transform.parent        = rayOrigin;
     m_BlinkVisualsGO.transform.localPosition = Vector3.zero;
     m_BlinkVisualsGO.transform.localRotation = Quaternion.identity;
 }
Ejemplo n.º 3
0
        void Start()
        {
            if (this.IsSharedUpdater(this))
            {
                if (m_Preferences == null)
                {
                    m_Preferences = new Preferences();

                    // Share one preferences object across all instances
                    foreach (var linkedObject in linkedObjects)
                    {
                        ((LocomotionTool)linkedObject).m_Preferences = m_Preferences;
                    }
                }

                var instance = EditorXRUtils.Instantiate(m_RingPrefab, cameraRig, false);
                m_MouseLocomotionRing = instance.GetComponent <MouseLocomotionRing>();
            }

            m_BlinkVisualsGO = EditorXRUtils.Instantiate(m_BlinkVisualsPrefab, rayOrigin);
            m_BlinkVisuals   = m_BlinkVisualsGO.GetComponentInChildren <BlinkVisuals>();
            this.InjectFunctionalitySingle(m_BlinkVisuals);
            m_BlinkVisuals.ignoreList = this.GetVRPlayerObjects();
            m_BlinkVisualsGO.SetActive(false);
            m_BlinkVisualsGO.transform.parent        = rayOrigin;
            m_BlinkVisualsGO.transform.localPosition = Vector3.zero;
            m_BlinkVisualsGO.transform.localRotation = Quaternion.identity;

            var viewerScaleObject = EditorXRUtils.Instantiate(m_ViewerScaleVisualsPrefab, cameraRig, false);

            m_ViewerScaleVisuals = viewerScaleObject.GetComponent <ViewerScaleVisuals>();
            this.InjectFunctionalitySingle(m_ViewerScaleVisuals);
            viewerScaleObject.SetActive(false);

            InputUtils.GetBindingDictionaryFromActionMap(m_ActionMap, m_Controls);
        }