void CheckConnection() { if (!started) { node.Connect(); started = true; } else { if (NodeInformation.type.Equals("master") && node.connections.Count != NodeInformation.numberOfSlaves || NodeInformation.type.Equals("slave") && node.connections.Count == 0) { #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false; #else Application.Quit(); #endif } } }
void CheckConnection() { if (!started) { node.Connect(); started = true; } else { if (NodeInformation.isMaster() && node.connections.Count != ((Server)node).targetClientNumber || !NodeInformation.isMaster() && node.connections.Count == 0) { #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false; #else Application.Quit(); #endif } } }