/// <summary> /// Runs on both Server and Client /// Networking is NOT initialized when this fires /// </summary> public override void Awake() { if (Application.platform == RuntimePlatform.WebGLPlayer) { var hud = GetComponent <Mirror.NetworkManagerHUD>(); hud.showGUI = false; var go = GetURL.GetURLFromPage().Contains("https") ? Instantiate(clienthttpsTransport) : Instantiate(clienthttpTransport); transport = go.GetComponent <MultiplexTransport>(); } if (Application.platform == RuntimePlatform.LinuxPlayer) { var go = Instantiate(serverTransport); transport = go.GetComponent <MultiplexTransport>(); } base.Awake(); }
private void Start() { if ( Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.WindowsPlayer ) { useWebSockets = false; } else { useWebSockets = true; } if (Application.platform == RuntimePlatform.WebGLPlayer) { var hud = GetComponent <NetworkManagerHUD>(); hud.showGUI = false; if (GetURL.GetURLFromPage().Contains("https")) { networkPort = 443; } else { networkPort = 80; } Debug.Log($"Auto starting client on port {networkPort}"); StartClient(); } if (Application.platform == RuntimePlatform.LinuxPlayer) { networkPort = 8080; } if (isHeadless) { Debug.Log($"Auto starting server on port {networkPort}"); StartServer(); } gameManager = GameManager.instance; }
public virtual void getURL(GetURL action) { }
public override void getURL(GetURL action) { start(action); out_Renamed.WriteLine(" " + action.url + " " + action.target); }
set => ProxyList.Add(new WebProxy(GetURL(ip)) {