Browse Source

Did some webGL fixes + port stuff

master
Joshua Reason 5 years ago
parent
commit
7e1f85b7e4
29 changed files with 88 additions and 107 deletions
  1. +0
    -8
      Assets/Plugins/IngameDebugConsole/Android.meta
  2. +0
    -8
      Assets/Plugins/IngameDebugConsole/Prefabs.meta
  3. +0
    -8
      Assets/Plugins/IngameDebugConsole/Scripts.meta
  4. +0
    -8
      Assets/Plugins/IngameDebugConsole/Sprites/Unused.meta
  5. +1
    -1
      Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Belt 1.prefab.meta
  6. +1
    -1
      Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Belt 2.prefab.meta
  7. +1
    -1
      Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Cannon 1.prefab.meta
  8. +1
    -1
      Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Cannon 2.prefab.meta
  9. +0
    -7
      Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-15.prefab.meta
  10. +0
    -7
      Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-16.prefab.meta
  11. +0
    -7
      Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-2.prefab.meta
  12. +0
    -7
      Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-4.prefab.meta
  13. +0
    -7
      Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-5.prefab.meta
  14. +0
    -7
      Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-7.prefab.meta
  15. +2
    -2
      Assets/Scenes/Client Scenes/LoginScreen.unity
  16. +1
    -1
      Assets/Scripts/Components.meta
  17. +0
    -8
      Assets/Scripts/LogicBlocks.meta
  18. +3
    -3
      Assets/Scripts/Networking/Client/ClientLoginManager.cs
  19. +52
    -0
      Assets/Scripts/UI/Client/PortManager.cs
  20. +11
    -0
      Assets/Scripts/UI/Client/PortManager.cs.meta
  21. +1
    -1
      Assets/Scripts/UI/Lobby/LobbyUIController.cs
  22. +2
    -2
      Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.data.unityweb
  23. +2
    -2
      Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.wasm.code.unityweb
  24. +2
    -2
      Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.wasm.framework.unityweb
  25. +4
    -4
      Assets/StreamingAssets/WebGLBuild/index.html
  26. +0
    -0
      Assets/StreamingAssets/WebGLBuild/logo.png
  27. +1
    -1
      Assets/StreamingAssets/WebGLBuild/logo.png.meta
  28. +1
    -1
      Assets/WebGLTemplates/BetterTemplate/index.html
  29. +2
    -2
      ProjectSettings/GraphicsSettings.asset

+ 0
- 8
Assets/Plugins/IngameDebugConsole/Android.meta View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 3d7d7a61a5341904eb3c65af025b1d86
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 0
- 8
Assets/Plugins/IngameDebugConsole/Prefabs.meta View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 7dbc36665bc0d684db9a4447e27a7a4b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 0
- 8
Assets/Plugins/IngameDebugConsole/Scripts.meta View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 860c08388401a6d4e858fe4910ea9337
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 0
- 8
Assets/Plugins/IngameDebugConsole/Sprites/Unused.meta View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: f6caae32d463529478f2186f47c2e3fe
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-11.prefab.meta → Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Belt 1.prefab.meta View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: a22bc23ff1dfb4442a922d96ba2557b6
guid: 0b20061418e541b4186d9712a9923cc0
PrefabImporter: PrefabImporter:
externalObjects: {} externalObjects: {}
userData: userData:

Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-12.prefab.meta → Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Belt 2.prefab.meta View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: f00cd63e75da6d644a66a7b25c694144
guid: 8a999b2ffdc79e342aa37be848083da7
PrefabImporter: PrefabImporter:
externalObjects: {} externalObjects: {}
userData: userData:

Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-13.prefab.meta → Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Cannon 1.prefab.meta View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 57b3cb465084bcc4589f6194ff7bb3ed
guid: c8dd90dcd87d5b540a6d9d1fa011a018
PrefabImporter: PrefabImporter:
externalObjects: {} externalObjects: {}
userData: userData:

Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-14.prefab.meta → Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3 Cannon 2.prefab.meta View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: df00ce78d0e892a4b988429f81372c54
guid: 8a0c84c91ff5a5a449771f58dbdd9ea2
PrefabImporter: PrefabImporter:
externalObjects: {} externalObjects: {}
userData: userData:

+ 0
- 7
Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-15.prefab.meta View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 459c652e311ad1b4482f67d7605a002b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 0
- 7
Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-16.prefab.meta View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: afef4483f113fdb4cb8a350df0465962
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 0
- 7
Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-2.prefab.meta View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: aad1e366d32a4824eb33e0d5b07a081a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 0
- 7
Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-4.prefab.meta View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: b2fd772217f8f3e4d845f17e9b86e26c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 0
- 7
Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-5.prefab.meta View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: d6251573e8a637547adb613e0d3b3929
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 0
- 7
Assets/Prefabs/Map Sections/Link Sections/Width 3/Link 3-7.prefab.meta View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 1e454c5e54e596b42978211be3c40b12
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 2
- 2
Assets/Scenes/Client Scenes/LoginScreen.unity View File

@ -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

Assets/Models.meta → Assets/Scripts/Components.meta View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 296bd90e667df1f4697823a0aa45acf0
guid: 8d7394d70ec233849a60a26da5f23b75
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

+ 0
- 8
Assets/Scripts/LogicBlocks.meta View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 8936b441d7647f74884c94f97bfb8931
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 3
- 3
Assets/Scripts/Networking/Client/ClientLoginManager.cs View File

@ -14,11 +14,11 @@ namespace Networking.Client
[SerializeField] [SerializeField]
[Tooltip("Server Address to Connect to")] [Tooltip("Server Address to Connect to")]
private string ServerIP;
public string ServerIP;
[SerializeField] [SerializeField]
[Tooltip("Port to connect on")] [Tooltip("Port to connect on")]
private int Port;
public int Port;
[SerializeField] [SerializeField]
[Tooltip("Try and connect on Play")] [Tooltip("Try and connect on Play")]
@ -83,7 +83,7 @@ namespace Networking.Client
public void StartClient(string ipAddress, int port) public void StartClient(string ipAddress, int port)
{ {
Client.Connect(ipAddress, port);
Client.Connect(ipAddress, Port);
RegisterHandlers(); RegisterHandlers();
} }

+ 52
- 0
Assets/Scripts/UI/Client/PortManager.cs View File

@ -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
}
}

+ 11
- 0
Assets/Scripts/UI/Client/PortManager.cs.meta View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c3af16abe04540e44a97219125ae9b37
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

+ 1
- 1
Assets/Scripts/UI/Lobby/LobbyUIController.cs View File

@ -29,7 +29,7 @@ public class LobbyUIController : MonoBehaviour
// Start is called before the first frame update // Start is called before the first frame update
void Start() 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() private void OnEnable()

+ 2
- 2
Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.data.unityweb View File

@ -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

+ 2
- 2
Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.wasm.code.unityweb View File

@ -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

+ 2
- 2
Assets/StreamingAssets/WebGLBuild/Build/WebGLBuild.wasm.framework.unityweb View File

@ -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

+ 4
- 4
Assets/StreamingAssets/WebGLBuild/index.html View File

@ -4,7 +4,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>%UNITY_WEB_NAME%</title>
<title>Pet.Move()</title>
<style> <style>
html { html {
box-sizing: border-box; box-sizing: border-box;
@ -99,15 +99,15 @@
</div> </div>
</body> </body>
<script src="%UNITY_WEBGL_LOADER_URL%"></script>
<script src="Build/UnityLoader.js"></script>
<script> <script>
if (UnityLoader.SystemInfo.mobile) if (UnityLoader.SystemInfo.mobile)
{ {
window.location.replace("http://www.google.com");
window.location.replace("https://drive.google.com/file/d/1NIZWYDeFr34JC4Ekig0aYny-DB3JVMMQ/view?usp=sharing");
} }
var gameInstance = UnityLoader.instantiate("gameContainer", "%UNITY_WEBGL_BUILD_URL%", {onProgress: UnityProgress});
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/WebGLBuild.json", {onProgress: UnityProgress});
function UnityProgress(gameInstance, progress) { function UnityProgress(gameInstance, progress) {
if (!gameInstance.Module) { if (!gameInstance.Module) {
return; return;

Assets/StreamingAssets/WebGLBuild/TemplateData/logo.png → Assets/StreamingAssets/WebGLBuild/logo.png View File


Assets/StreamingAssets/WebGLBuild/TemplateData/logo.png.meta → Assets/StreamingAssets/WebGLBuild/logo.png.meta View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 73ef2099cc3789e4082152b3e189b9a7
guid: bd1f430b8279bf844ae8c7493549e2ed
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

+ 1
- 1
Assets/WebGLTemplates/BetterTemplate/index.html View File

@ -104,7 +104,7 @@
if (UnityLoader.SystemInfo.mobile) if (UnityLoader.SystemInfo.mobile)
{ {
window.location.replace("http://www.google.com");
window.location.replace("https://drive.google.com/file/d/1NIZWYDeFr34JC4Ekig0aYny-DB3JVMMQ/view?usp=sharing");
} }
var gameInstance = UnityLoader.instantiate("gameContainer", "%UNITY_WEBGL_BUILD_URL%", {onProgress: UnityProgress}); var gameInstance = UnityLoader.instantiate("gameContainer", "%UNITY_WEBGL_BUILD_URL%", {onProgress: UnityProgress});

+ 2
- 2
ProjectSettings/GraphicsSettings.asset View File

@ -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

Loading…
Cancel
Save