/// <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();
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 public virtual void  getURL(GetURL action)
 {
 }
Exemplo n.º 4
0
 public override void  getURL(GetURL action)
 {
     start(action);
     out_Renamed.WriteLine(" " + action.url + " " + action.target);
 }
Exemplo n.º 5
0
 set => ProxyList.Add(new WebProxy(GetURL(ip))
 {