コード例 #1
0
ファイル: MonitoringManager.cs プロジェクト: Mocahteam/FYFY
 void OnDestroy()
 {
     // ask Laalys to quit
     if (networkStream != null)
     {
         byte[] sendBytes = Encoding.UTF8.GetBytes("Quit");
         networkStream.Write(sendBytes, 0, sendBytes.Length);
     }
     // close Socket
     if (clientSocket != null)
     {
         clientSocket.Close();
     }
     if (serverSocket != null)
     {
         serverSocket.Stop();
     }
     // Stop process
     if (LaalysProcess != null && !LaalysProcess.HasExited)
     {
         // Stop to capture output stream
         LaalysProcess.Exited -= LaalysEH;
         LaalysProcess.Kill();
     }
     // Save traces
     if (Application.isPlaying && debugLogs)
     {
         XmlHandler.saveTraces(SceneManager.GetActiveScene().name);
     }
     if (Instance == this)
     {
         Instance = null;
     }
 }
コード例 #2
0
ファイル: MonitoringManager.cs プロジェクト: NeatWolf/FYFY
 void OnDestroy()
 {
     // close Socket
     if (clientSocket != null)
     {
         clientSocket.Close();
     }
     if (serverSocket != null)
     {
         serverSocket.Stop();
     }
     // Stop process
     if (LaalysProcess != null && !LaalysProcess.HasExited)
     {
         // Stop to capture output stream
         LaalysProcess.Exited -= LaalysEH;
         LaalysProcess.Kill();
     }
     // Save traces
     if (Application.isPlaying)
     {
         XmlHandler.saveTraces(SceneManager.GetActiveScene().name);
     }
     if (Instance == this)
     {
         Instance = null;
     }
 }