コード例 #1
0
 private void OnDisable()
 {
     PlayerConnectorAttribute.Disconnect(this);
     editorConnection.Unregister(EditorConnectionMessageID.Player, OnPlayerMessageReceived);
     editorConnection.DisconnectAll();
     editorConnection = null;
 }
コード例 #2
0
 void OnDestroy()
 {
                 #if UNITY_2017_1_OR_NEWER
     if (editorConnection != null)
     {
         editorConnection.DisconnectAll();
     }
                 #endif
 }
コード例 #3
0
 public void OnEditorDisconnect()
 {
                 #if UNITY_2017_1_OR_NEWER
     Debug.Log("Disconnect from editor called from computer");
     bSessionActive = false;
     SendDisconnectToPlayer();
     editorConnection.DisconnectAll();
                 #endif
 }
コード例 #4
0
ファイル: ARRemoteEditor.cs プロジェクト: seanmoakes/tARtris
        void OnGUI()
        {
            string message;

            if (m_RemoteInterface.connected)
            {
                message = string.Format("Connected to remote AR device: {0}", m_RemoteInterface.playerId);
                var buttonRect = new Rect((Screen.width / 2) - 200, (Screen.height / 2) - 200, 400, 100);

                if (m_RemoteInterface.serviceRunning)
                {
                    if (GUI.Button(buttonRect, "Stop Remote AR Session"))
                    {
                        m_RemoteInterface.StopRemoteService();
                    }
                }
                else
                {
                    if (GUI.Button(buttonRect, "Start Remote AR Session"))
                    {
                        m_RemoteInterface.StartRemoteService(GetSettings());
                    }
                }
            }
            else
            {
                message = "Please connect to remote Player in the console menu.";
            }

            var boxRect = new Rect((Screen.width / 2) - 200, (Screen.height / 2) + 100, 400, 50);

            GUI.Box(boxRect, message);

            if (GUI.Button(new Rect((Screen.width / 2) - 200, Screen.height - 50, 100, 50), "Disconnect"))
            {
                m_RemoteInterface.StopRemoteService();
                m_EditorConnection.DisconnectAll();
            }
        }
コード例 #5
0
    private void OnDestroy()
    {
#if UNITY_2017_1_OR_NEWER
        if (_editorConnection != null)
        {
            _editorConnection.DisconnectAll();
        }
#endif
        if (_recordingMode == RecordingMode.PLAYING)
        {
            _playingFileStream.Close();
        }
    }
コード例 #6
0
 void OnDestroy()
 {
                 #if UNITY_2017_1_OR_NEWER
     editorConnection.DisconnectAll();
                 #endif
 }
コード例 #7
0
 public void DisconnectAll() => m_Connection.DisconnectAll();