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.
Inheritance: 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;
     }
 }
コード例 #3
0
 // 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");
         }
     }
 }
コード例 #6
0
    // 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
ファイル: UIController.cs プロジェクト: tooploox/holo
 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
ファイル: BasicSharingStatus.cs プロジェクト: peted70/mr-250
 // 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;
 }