diff --git a/Assets/Plugins/IngameDebugConsole/Android.meta b/Assets/Plugins/IngameDebugConsole/Android.meta deleted file mode 100644 index 12049b6..0000000 --- a/Assets/Plugins/IngameDebugConsole/Android.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3d7d7a61a5341904eb3c65af025b1d86 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/IngameDebugConsole/Prefabs.meta b/Assets/Plugins/IngameDebugConsole/Prefabs.meta deleted file mode 100644 index 6aa8bf2..0000000 --- a/Assets/Plugins/IngameDebugConsole/Prefabs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7dbc36665bc0d684db9a4447e27a7a4b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/IngameDebugConsole/Scripts.meta b/Assets/Plugins/IngameDebugConsole/Scripts.meta deleted file mode 100644 index 72dcaac..0000000 --- a/Assets/Plugins/IngameDebugConsole/Scripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 860c08388401a6d4e858fe4910ea9337 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/IngameDebugConsole/Sprites/Unused.meta b/Assets/Plugins/IngameDebugConsole/Sprites/Unused.meta deleted file mode 100644 index f3769b1..0000000 --- a/Assets/Plugins/IngameDebugConsole/Sprites/Unused.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f6caae32d463529478f2186f47c2e3fe -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-11.prefab.meta b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Belt 1.prefab.meta similarity index 74% rename from Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-11.prefab.meta rename to Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Belt 1.prefab.meta index d81f1e9..becfa49 100644 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-11.prefab.meta +++ b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Belt 1.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a22bc23ff1dfb4442a922d96ba2557b6 +guid: 0b20061418e541b4186d9712a9923cc0 PrefabImporter: externalObjects: {} userData: diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-12.prefab.meta b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Belt 2.prefab.meta similarity index 74% rename from Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-12.prefab.meta rename to Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Belt 2.prefab.meta index c2ba151..d3eaf3d 100644 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-12.prefab.meta +++ b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Belt 2.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f00cd63e75da6d644a66a7b25c694144 +guid: 8a999b2ffdc79e342aa37be848083da7 PrefabImporter: externalObjects: {} userData: diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-13.prefab.meta b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Cannon 1.prefab.meta similarity index 74% rename from Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-13.prefab.meta rename to Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Cannon 1.prefab.meta index 566c374..7759abe 100644 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-13.prefab.meta +++ b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Cannon 1.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 57b3cb465084bcc4589f6194ff7bb3ed +guid: c8dd90dcd87d5b540a6d9d1fa011a018 PrefabImporter: externalObjects: {} userData: diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-14.prefab.meta b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Cannon 2.prefab.meta similarity index 74% rename from Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-14.prefab.meta rename to Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Cannon 2.prefab.meta index b96e662..fdde1d3 100644 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-14.prefab.meta +++ b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Cannon 2.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: df00ce78d0e892a4b988429f81372c54 +guid: 8a0c84c91ff5a5a449771f58dbdd9ea2 PrefabImporter: externalObjects: {} userData: diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-15.prefab.meta b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-15.prefab.meta deleted file mode 100644 index e336b36..0000000 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-15.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 459c652e311ad1b4482f67d7605a002b -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-16.prefab.meta b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-16.prefab.meta deleted file mode 100644 index 1b802fb..0000000 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-16.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: afef4483f113fdb4cb8a350df0465962 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-2.prefab.meta b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-2.prefab.meta deleted file mode 100644 index 3c375d9..0000000 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-2.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: aad1e366d32a4824eb33e0d5b07a081a -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-4.prefab.meta b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-4.prefab.meta deleted file mode 100644 index 6ffce27..0000000 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-4.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: b2fd772217f8f3e4d845f17e9b86e26c -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-5.prefab.meta b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-5.prefab.meta deleted file mode 100644 index aae45ff..0000000 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-5.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d6251573e8a637547adb613e0d3b3929 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-7.prefab.meta b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-7.prefab.meta deleted file mode 100644 index f578fcc..0000000 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-7.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 1e454c5e54e596b42978211be3c40b12 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scenes/Client Scenes/LoginScreen.unity b/Assets/Scenes/Client Scenes/LoginScreen.unity index af9bcfc..38844d1 100644 --- a/Assets/Scenes/Client Scenes/LoginScreen.unity +++ b/Assets/Scenes/Client Scenes/LoginScreen.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0443fd65d8a432cf935808d17d8b81244f77477aac80fb954dbf6f3702c85510 -size 260342 +oid sha256:abe69c3fc0978729776c043edbe2edce76aa1e43acd32bbcaaa96a89c9edf12a +size 262047 diff --git a/Assets/Models.meta b/Assets/Scripts/Components.meta similarity index 77% rename from Assets/Models.meta rename to Assets/Scripts/Components.meta index 5346456..5a95b09 100644 --- a/Assets/Models.meta +++ b/Assets/Scripts/Components.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 296bd90e667df1f4697823a0aa45acf0 +guid: 8d7394d70ec233849a60a26da5f23b75 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/LogicBlocks.meta b/Assets/Scripts/LogicBlocks.meta deleted file mode 100644 index 98af9d1..0000000 --- a/Assets/Scripts/LogicBlocks.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8936b441d7647f74884c94f97bfb8931 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Networking/Client/ClientLoginManager.cs b/Assets/Scripts/Networking/Client/ClientLoginManager.cs index 2cc1817..71eb702 100644 --- a/Assets/Scripts/Networking/Client/ClientLoginManager.cs +++ b/Assets/Scripts/Networking/Client/ClientLoginManager.cs @@ -14,11 +14,11 @@ namespace Networking.Client [SerializeField] [Tooltip("Server Address to Connect to")] - private string ServerIP; + public string ServerIP; [SerializeField] [Tooltip("Port to connect on")] - private int Port; + public int Port; [SerializeField] [Tooltip("Try and connect on Play")] @@ -83,7 +83,7 @@ namespace Networking.Client public void StartClient(string ipAddress, int port) { - Client.Connect(ipAddress, port); + Client.Connect(ipAddress, Port); RegisterHandlers(); } diff --git a/Assets/Scripts/UI/Client/PortManager.cs b/Assets/Scripts/UI/Client/PortManager.cs new file mode 100644 index 0000000..dc0e5e1 --- /dev/null +++ b/Assets/Scripts/UI/Client/PortManager.cs @@ -0,0 +1,52 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Networking.Client; +using System.Runtime.InteropServices; + +public class PortManager : MonoBehaviour +{ + + public int AndroidPort = 2222; + public int WebGLPort = 4444; + + [Header("references")] + public ClientLoginManager ClientManager; + public TMPro.TMP_InputField ipField; + public TMPro.TMP_InputField portfield; + + [DllImport("__Internal")] + private static extern string GetURLFromPage(); + + // Start is called before the first frame update + void Start() + { + +#if (UNITY_WEBGL && !UNITY_EDITOR) + if (ClientManager != null) + { + ClientManager.Port = WebGLPort; + portfield.text = WebGLPort.ToString(); + portfield.transform.parent.gameObject.SetActive(false); + + System.Uri url = new System.Uri(GetURLFromPage()); + + + ipField.text = url.Host; + ClientManager.ServerIP = url.Host; + ClientManager.StartClient(url.Host, WebGLPort); + } +#else + if (ClientManager != null) + { + ClientManager.Port = AndroidPort; + portfield.text = AndroidPort.ToString(); + } + +#endif + + + } + + +} diff --git a/Assets/Scripts/UI/Client/PortManager.cs.meta b/Assets/Scripts/UI/Client/PortManager.cs.meta new file mode 100644 index 0000000..6ceb9b3 --- /dev/null +++ b/Assets/Scripts/UI/Client/PortManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c3af16abe04540e44a97219125ae9b37 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/UI/Lobby/LobbyUIController.cs b/Assets/Scripts/UI/Lobby/LobbyUIController.cs index d76d23f..7ba1da1 100644 --- a/Assets/Scripts/UI/Lobby/LobbyUIController.cs +++ b/Assets/Scripts/UI/Lobby/LobbyUIController.cs @@ -29,7 +29,7 @@ public class LobbyUIController : MonoBehaviour // Start is called before the first frame update void Start() { - IPText.text = "Lobby - " + Networking.Utility.GetIP(Networking.Utility.ADDRESSFAM.IPv4); + IPText.text = "Enter '" + Networking.Utility.GetIP(Networking.Utility.ADDRESSFAM.IPv4) + "' into browser"; } private void OnEnable() diff --git a/Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.data.unityweb b/Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.data.unityweb index 7c55a72..3aae909 100644 --- a/Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.data.unityweb +++ b/Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.data.unityweb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:834fe6f79e87b4c9405e154dd7b134071eab631a9249ae12236ec5a2eb184a3b -size 16005156 +oid sha256:bb408c3b76ddf8d52dbeb8645ef4b9a2050b35a522ed0b1cc215be3ead2663f4 +size 16006038 diff --git a/Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.wasm.code.unityweb b/Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.wasm.code.unityweb index f00d6d9..5133599 100644 --- a/Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.wasm.code.unityweb +++ b/Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.wasm.code.unityweb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:05156bb919e16298a443fdebf2f3cccf02e96620b0565b6e70907e03abeb2fbb -size 5571695 +oid sha256:1d8aa297338fd71eebd907f25e88d8391504a3369303a25e7ba12407bbb34072 +size 5572199 diff --git a/Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.wasm.framework.unityweb b/Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.wasm.framework.unityweb index 661d9b1..6985273 100644 --- a/Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.wasm.framework.unityweb +++ b/Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.wasm.framework.unityweb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa5edb82d981cae999718d88218ba8e83c79c11da3be1f4d12e0dc4dbd440591 -size 96976 +oid sha256:195076cc5cbacd37b39832a0a14e9a338a25be737309dd4fbcd92d004a0ec01e +size 96968 diff --git a/Assets/StreamingAssets/WebGLBuild/index.html b/Assets/StreamingAssets/WebGLBuild/index.html index de8b8f8..c342327 100644 --- a/Assets/StreamingAssets/WebGLBuild/index.html +++ b/Assets/StreamingAssets/WebGLBuild/index.html @@ -4,7 +4,7 @@
-