Example #1
0
 /// This function is called when the MonoBehaviour will be destroyed.
 void OnDestroy()
 {
     if (NetworkInitialized && singleton == this)
     {
         Debug.Log("Network is being shutdown");
         PhaNetworkingAPI.ShutDownNetwork(PhaNetworkingAPI.mainSocket);
         NetworkInitialized = false;
     }
 }
Example #2
0
 /// <summary>
 /// Callback sent to all game objects before the application is quit.
 /// </summary>
 void OnApplicationQuit()
 {
     PhaNetworkingAPI.ShutDownNetwork(PhaNetworkingAPI.mainSocket);
     PhaNetworkingAPI.mainSocket = (System.IntPtr) 0;
     Debug.Log(PhaNetworkingAPI.mainSocket + " from close");
 }
Example #3
0
 /// <summary>
 /// This function is called when the behaviour becomes disabled or inactive.
 /// </summary>
 void OnDisable()
 {
     PhaNetworkingAPI.ShutDownNetwork(PhaNetworkingAPI.mainSocket);
 }
Example #4
0
 /// <summary>
 /// This function is called when the MonoBehaviour will be destroyed.
 /// </summary>
 void OnDestroy()
 {
     PhaNetworkingAPI.ShutDownNetwork(PhaNetworkingAPI.mainSocket);
 }