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;
 }
Beispiel #2
0
        private void Start()
        {
            // On the immersive device the UI is best placed a little closer than on a HoloLens
#if UNITY_WSA && UNITY_2017_2_OR_NEWER
            if (UnityEngine.XR.WSA.HolographicSettings.IsDisplayOpaque)
            {
                gameObject.GetComponent <SimpleTagalong>().TagalongDistance = 1;
            }
#endif

            // Register for events when sessions are found / joined.
            networkDiscovery = NetworkDiscoveryWithAnchors.Instance;
            networkDiscovery.SessionListChanged      += NetworkDiscovery_SessionListChanged;
            networkDiscovery.ConnectionStatusChanged += NetworkDiscovery_ConnectionStatusChanged;
            ScrollSessions(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
        }
Beispiel #4
0
 // Use this for initialization
 void Start()
 {
     transform.SetParent(DisconnectedPosition.transform, false);
     networkDisco = NetworkDiscoveryWithAnchors.Instance;
     networkDisco.ConnectionStatusChanged += NetworkDisco_ConnectionStatusChanged;
 }