Inherits from UNet's NetworkDiscovery script. Adds automatic anchor management on discovery. If the script detects that it should be the server then the script starts the anchor creation and export process. If the script detects that it should be a client then the script kicks off the anchor ingestion process.
상속: NetworkDiscovery
예제 #1
0
 // Use this for initialization
 void Start()
 {
     // Do not change parent, keep debug button inside side menu, this way it is also not hidden after "Start"
     transform.SetParent(DisconnectedPosition.transform, true);
     networkDisco = NetworkDiscoveryWithAnchors.Instance;
     networkDisco.ConnectionStatusChanged += NetworkDisco_ConnectionStatusChanged;
 }
예제 #2
0
 private void OnDestroy()
 {
     if (_networkDiscovery != null)
     {
         _networkDiscovery.SessionListChanged -= NetworkDiscovery_SessionListChanged;
         _networkDiscovery = null;
     }
 }
 // Use this for initialization
 void Start()
 {
     networkDiscovery = NetworkDiscoveryWithAnchors.Instance;
     networkDiscovery.SessionListChanged      += NetworkDiscovery_SessionListChanged;
     networkDiscovery.ConnectionStatusChanged += NetworkDiscovery_ConnectionStatusChanged;
     sessionList = networkDiscovery.remoteSessions;
     Debug.Log("Number of sessions: " + sessionList.Count().ToString());
 }
예제 #4
0
 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;
 }
예제 #5
0
 // Use this for initialization
 void Start()
 {
     if (host)
     {
         networkDiscovery = NetworkDiscoveryWithAnchors.Instance;
         if (networkDiscovery.running)
         {
             networkDiscovery.StartHosting("SuperRad");
         }
     }
 }
    // Use this for initialization
    void Start()
    {
        if (UnityEngine.XR.WSA.HolographicSettings.IsDisplayOpaque == true)
        {
            gameObject.GetComponent <SimpleTagalong>().TagalongDistance = 1;
        }

        networkDiscovery = NetworkDiscoveryWithAnchors.Instance;
        networkDiscovery.SessionListChanged      += NetworkDiscovery_SessionListChanged;
        networkDiscovery.ConnectionStatusChanged += NetworkDiscovery_ConnectionStatusChanged;
        sessionList = networkDiscovery.remoteSessions;
        ScrollSessions(0);
    }
예제 #7
0
        private void Start()
        {
            // Cache references
            scrollRect = GetComponentInChildren <ScrollRect>();

            networkDiscovery = NetworkDiscoveryWithAnchors.Instance;

            // Subscribe to log message events
            Application.logMessageReceived += HandleLog;

            // Set the starting text
            debugText.text = "Debug messages will appear here.\n\n";
        }
예제 #8
0
    private void CheckNetworkDiscoveryInitialized()
    {
        if (_networkDiscovery == null &&
            NetworkDiscoveryWithAnchors.Instance != null)
        {
            NetworkDiscoveryWithAnchors nd = NetworkDiscoveryWithAnchors.Instance;

            if (nd.running)
            {
                _networkDiscovery = nd;
            }

            if (_networkDiscovery != null)
            {
                _sessionList = _networkDiscovery.remoteSessions;
                RefreshDisplay();
                _networkDiscovery.SessionListChanged      += NetworkDiscovery_SessionListChanged;
                _networkDiscovery.ConnectionStatusChanged += _networkDiscovery_ConnectionStatusChanged;
            }
        }
    }
예제 #9
0
 void Awake()
 {
     networkDiscovery = NetworkDiscoveryWithAnchors.Instance;
     anchorManager    = UNetAnchorManager.Instance;
 }
예제 #10
0
 private void Start()
 {
     networkDiscovery   = NetworkDiscoveryWithAnchors.Instance;
     scrollingUIControl = ScrollingSessionListUIController.Instance;
 }
예제 #11
0
 public void ResetAutoconnect()
 {
     _networkDiscovery = null;
 }
예제 #12
0
 private void Start()
 {
     _networkDiscovery = null;
 }
예제 #13
0
 // Use this for initialization
 void Start()
 {
     networkDiscovery = NetworkDiscoveryWithAnchors.Instance;
 }
예제 #14
0
 // Use this for initialization
 void Awake()
 {
     textMesh         = GetComponent <TextMesh>();
     networkDiscovery = NetworkDiscoveryWithAnchors.Instance;
     Application.logMessageReceivedThreaded += Application_logMessageReceivedThreaded;
 }
예제 #15
0
 // Use this for initialization
 void Start()
 {
     transform.SetParent(DisconnectedPosition.transform, false);
     networkDisco = NetworkDiscoveryWithAnchors.Instance;
     networkDisco.ConnectionStatusChanged += NetworkDisco_ConnectionStatusChanged;
 }
 private void Awake()
 {
     _networkDiscovery = NetworkDiscoveryWithAnchors.Instance;
     _anchorManager    = UNetAnchorManager.Instance;
 }