void Start() { var version = $"PingSample_{Application.buildGUID}_{Application.unityVersion}"; ServerConfig.Info.BuildId = version; m_Server = new MultiplayPingServer(ServerConfig); }
void OnDestroy() { StopAllCoroutines(); m_Server?.Dispose(); m_Server = null; #if UNITY_EDITOR EditorApplication.playModeStateChanged -= CleanUpOnExitingPlayMode; #endif }
void Start() { #if UNITY_EDITOR // Ensure that the server is shutdown properly when stopped in the editor EditorApplication.playModeStateChanged += CleanUpOnExitingPlayMode; #endif var version = $"PingSample_{Application.buildGUID}_{Application.unityVersion}"; ServerConfig.Info.BuildId = version; m_Server = new MultiplayPingServer(ServerConfig); }
void OnDestroy() { m_Server?.Dispose(); m_Server = null; }