@ -1,8 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 3d7d7a61a5341904eb3c65af025b1d86 | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,8 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 7dbc36665bc0d684db9a4447e27a7a4b | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,8 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 860c08388401a6d4e858fe4910ea9337 | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,8 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: f6caae32d463529478f2186f47c2e3fe | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: a22bc23ff1dfb4442a922d96ba2557b6 | |||||
guid: 0b20061418e541b4186d9712a9923cc0 | |||||
PrefabImporter: | PrefabImporter: | ||||
externalObjects: {} | externalObjects: {} | ||||
userData: | userData: |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: f00cd63e75da6d644a66a7b25c694144 | |||||
guid: 8a999b2ffdc79e342aa37be848083da7 | |||||
PrefabImporter: | PrefabImporter: | ||||
externalObjects: {} | externalObjects: {} | ||||
userData: | userData: |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: 57b3cb465084bcc4589f6194ff7bb3ed | |||||
guid: c8dd90dcd87d5b540a6d9d1fa011a018 | |||||
PrefabImporter: | PrefabImporter: | ||||
externalObjects: {} | externalObjects: {} | ||||
userData: | userData: |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: df00ce78d0e892a4b988429f81372c54 | |||||
guid: 8a0c84c91ff5a5a449771f58dbdd9ea2 | |||||
PrefabImporter: | PrefabImporter: | ||||
externalObjects: {} | externalObjects: {} | ||||
userData: | userData: |
@ -1,7 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 459c652e311ad1b4482f67d7605a002b | |||||
PrefabImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,7 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: afef4483f113fdb4cb8a350df0465962 | |||||
PrefabImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,7 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: aad1e366d32a4824eb33e0d5b07a081a | |||||
PrefabImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,7 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: b2fd772217f8f3e4d845f17e9b86e26c | |||||
PrefabImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,7 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: d6251573e8a637547adb613e0d3b3929 | |||||
PrefabImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,7 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 1e454c5e54e596b42978211be3c40b12 | |||||
PrefabImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,3 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | version https://git-lfs.github.com/spec/v1 | ||||
oid sha256:0443fd65d8a432cf935808d17d8b81244f77477aac80fb954dbf6f3702c85510 | |||||
size 260342 | |||||
oid sha256:abe69c3fc0978729776c043edbe2edce76aa1e43acd32bbcaaa96a89c9edf12a | |||||
size 262047 |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: 296bd90e667df1f4697823a0aa45acf0 | |||||
guid: 8d7394d70ec233849a60a26da5f23b75 | |||||
folderAsset: yes | folderAsset: yes | ||||
DefaultImporter: | DefaultImporter: | ||||
externalObjects: {} | externalObjects: {} |
@ -1,8 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 8936b441d7647f74884c94f97bfb8931 | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -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 | |||||
} | |||||
} |
@ -0,0 +1,11 @@ | |||||
fileFormatVersion: 2 | |||||
guid: c3af16abe04540e44a97219125ae9b37 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,3 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | version https://git-lfs.github.com/spec/v1 | ||||
oid sha256:834fe6f79e87b4c9405e154dd7b134071eab631a9249ae12236ec5a2eb184a3b | |||||
size 16005156 | |||||
oid sha256:bb408c3b76ddf8d52dbeb8645ef4b9a2050b35a522ed0b1cc215be3ead2663f4 | |||||
size 16006038 |
@ -1,3 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | version https://git-lfs.github.com/spec/v1 | ||||
oid sha256:05156bb919e16298a443fdebf2f3cccf02e96620b0565b6e70907e03abeb2fbb | |||||
size 5571695 | |||||
oid sha256:1d8aa297338fd71eebd907f25e88d8391504a3369303a25e7ba12407bbb34072 | |||||
size 5572199 |
@ -1,3 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | version https://git-lfs.github.com/spec/v1 | ||||
oid sha256:fa5edb82d981cae999718d88218ba8e83c79c11da3be1f4d12e0dc4dbd440591 | |||||
size 96976 | |||||
oid sha256:195076cc5cbacd37b39832a0a14e9a338a25be737309dd4fbcd92d004a0ec01e | |||||
size 96968 |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: 73ef2099cc3789e4082152b3e189b9a7 | |||||
guid: bd1f430b8279bf844ae8c7493549e2ed | |||||
DefaultImporter: | DefaultImporter: | ||||
externalObjects: {} | externalObjects: {} | ||||
userData: | userData: |
@ -1,3 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | version https://git-lfs.github.com/spec/v1 | ||||
oid sha256:758221ccdd8ed2b386a3367cc69cc6c5466fe975c0b4a77ac65f68abcdaa7ffd | |||||
size 2428 | |||||
oid sha256:06f2c9c42c3e01f1143d4c15cfe4f316cfab490aba17fde694e466c130d4e3a4 | |||||
size 2359 |