Skip to content

Commit

Permalink
remove get url thing
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertAron committed Feb 20, 2024
1 parent d3c3999 commit c5696b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Assets/Scripts/GameScene/CustomNetworkManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ private void Start() {
else useWebSockets = true;
if(Application.platform == RuntimePlatform.WebGLPlayer){
var hud = GetComponent<NetworkManagerHUD>();
networkPort = 443;
hud.showGUI = false;
var url = GetURL.GetURLFromPage().Contains("https")
if(url=="" || url.Contains("https")) networkPort = 443;
else networkPort = 80;
// var url = GetURL.GetURLFromPage().Contains("https");
// if(url=="" || url.Contains("https")) networkPort = 443;
// else networkPort = 80;
Debug.Log($"Auto starting client on port {networkPort}");
StartClient();
}
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/GameScene/GetUrl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
using UnityEngine;

public class GetURL {
[DllImport("__Internal")]
public static extern string GetURLFromPage();
// [DllImport("__Internal")]
// public static extern string GetURLFromPage();
}

0 comments on commit c5696b3

Please sign in to comment.