private void Start()
 {
     scrollingUIControl = ScrollingSessionListUIController.Instance;
     textMesh           = transform.parent.GetComponentInChildren <TextMesh>();
     textMaterial       = textMesh.GetComponent <MeshRenderer>().material;
     textColorId        = Shader.PropertyToID("_Color");
     textMaterial.SetColor(textColorId, Color.grey);
     networkDiscovery = NetworkDiscoveryWithAnchors.Instance;
 }
Пример #2
0
        // Use this for initialization
        private void Start()
        {
            networkDiscovery = NetworkDiscoveryWithAnchors.Instance;

            if (UnityEngine.XR.WSA.HolographicSettings.IsDisplayOpaque && !Application.isEditor)
            {
                Debug.Log("Only hololens can host for now");
                Destroy(this.gameObject);
            }
        }
Пример #3
0
        // Use this for initialization
        void Start()
        {
            networkDiscovery = NetworkDiscoveryWithAnchors.Instance;
#if !UNITY_EDITOR
            if (UnityEngine.XR.WSA.HolographicSettings.IsDisplayOpaque)
            {
                Debug.Log("Only hololens can host for now");
                Destroy(this.gameObject);
            }
#endif
        }
        private void Start()
        {
            // On the immersive device the UI is best placed a little closer than on a HoloLens
            if (UnityEngine.XR.WSA.HolographicSettings.IsDisplayOpaque == true)
            {
                gameObject.GetComponent <SimpleTagalong>().TagalongDistance = 1;
            }

            // Register for events when sessions are found / joined.
            networkDiscovery = NetworkDiscoveryWithAnchors.Instance;
            networkDiscovery.SessionListChanged      += NetworkDiscovery_SessionListChanged;
            networkDiscovery.ConnectionStatusChanged += NetworkDiscovery_ConnectionStatusChanged;
            ScrollSessions(0);
        }
Пример #5
0
        private void Start()
        {
            networkDiscovery = NetworkDiscoveryWithAnchors.Instance;
#if UNITY_WSA && UNITY_2017_2_OR_NEWER
            if (UnityEngine.XR.WSA.HolographicSettings.IsDisplayOpaque && !Application.isEditor)
            {
                Debug.Log("Only HoloLens can host for now");
                Destroy(gameObject);
            }
#else
            if (Application.isEditor)
            {
                Debug.Log("Only HoloLens can host for now");
                Destroy(gameObject);
            }
#endif
        }
Пример #6
0
 void Awake()
 {
     networkDiscovery = NetworkDiscoveryWithAnchors.Instance;
     anchorManager    = UNetAnchorManager.Instance;
 }
 // Use this for initialization
 void Start()
 {
     transform.SetParent(DisconnectedPosition.transform, false);
     networkDisco = NetworkDiscoveryWithAnchors.Instance;
     networkDisco.ConnectionStatusChanged += NetworkDisco_ConnectionStatusChanged;
 }