From 03cb7a29452f34ecd3ffa188d328307f27b70a4b Mon Sep 17 00:00:00 2001 From: Dylan Hunt Date: Thu, 28 Sep 2023 15:29:22 +0800 Subject: [PATCH 1/5] feat!: +new transport ver, +WS TLS (!) beta (!) This is not officially supported, yet, by NGO with our current NGO version --- .../Scenes/HathoraDemoScene-Ngo.unity | 2 ++ src/Assets/Resources.meta | 8 +++++ src/Packages/manifest.json | 1 + src/Packages/packages-lock.json | 32 +++++++++++++------ 4 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 src/Assets/Resources.meta diff --git a/src/Assets/HathoraNgo/Scenes/HathoraDemoScene-Ngo.unity b/src/Assets/HathoraNgo/Scenes/HathoraDemoScene-Ngo.unity index 304b281..d4732b7 100644 --- a/src/Assets/HathoraNgo/Scenes/HathoraDemoScene-Ngo.unity +++ b/src/Assets/HathoraNgo/Scenes/HathoraDemoScene-Ngo.unity @@ -4799,6 +4799,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_ProtocolType: 0 + m_UseWebSockets: 1 + m_UseEncryption: 1 m_MaxPacketQueueSize: 128 m_MaxPayloadSize: 6144 m_HeartbeatTimeoutMS: 500 diff --git a/src/Assets/Resources.meta b/src/Assets/Resources.meta new file mode 100644 index 0000000..23d0e2e --- /dev/null +++ b/src/Assets/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 53fca211f2f87514f88353e16247dc89 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/src/Packages/manifest.json b/src/Packages/manifest.json index 902fa70..2dad007 100644 --- a/src/Packages/manifest.json +++ b/src/Packages/manifest.json @@ -13,6 +13,7 @@ "com.unity.test-framework": "1.1.33", "com.unity.textmeshpro": "3.0.6", "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.6", + "com.unity.transport": "2.1.0", "com.unity.ugui": "1.0.0", "com.unity.visualscripting": "1.8.0", "com.unity.modules.ai": "1.0.0", diff --git a/src/Packages/packages-lock.json b/src/Packages/packages-lock.json index 3670433..a931d3d 100644 --- a/src/Packages/packages-lock.json +++ b/src/Packages/packages-lock.json @@ -22,7 +22,7 @@ "dependencies": {} }, "com.unity.burst": { - "version": "1.8.7", + "version": "1.8.8", "depth": 1, "source": "registry", "dependencies": { @@ -31,12 +31,14 @@ "url": "https://packages.unity.com" }, "com.unity.collections": { - "version": "1.2.4", + "version": "2.2.1", "depth": 1, "source": "registry", "dependencies": { - "com.unity.burst": "1.6.6", - "com.unity.test-framework": "1.1.31" + "com.unity.burst": "1.8.8", + "com.unity.modules.unityanalytics": "1.0.0", + "com.unity.nuget.mono-cecil": "1.11.4", + "com.unity.test-framework.performance": "3.0.2" }, "url": "https://packages.unity.com" }, @@ -94,7 +96,7 @@ "url": "https://packages.unity.com" }, "com.unity.mathematics": { - "version": "1.2.6", + "version": "1.3.1", "depth": 1, "source": "registry", "dependencies": {}, @@ -223,6 +225,16 @@ }, "url": "https://packages.unity.com" }, + "com.unity.test-framework.performance": { + "version": "3.0.2", + "depth": 2, + "source": "registry", + "dependencies": { + "com.unity.test-framework": "1.1.31", + "com.unity.modules.jsonserialize": "1.0.0" + }, + "url": "https://packages.unity.com" + }, "com.unity.testtools.codecoverage": { "version": "1.2.4", "depth": 1, @@ -253,13 +265,13 @@ "url": "https://packages.unity.com" }, "com.unity.transport": { - "version": "1.3.4", - "depth": 1, + "version": "2.1.0", + "depth": 0, "source": "registry", "dependencies": { - "com.unity.collections": "1.2.4", - "com.unity.burst": "1.6.6", - "com.unity.mathematics": "1.2.6" + "com.unity.collections": "2.2.1", + "com.unity.burst": "1.8.8", + "com.unity.mathematics": "1.3.1" }, "url": "https://packages.unity.com" }, From 8d7e61cfcfe8b09847f688c6d87b94145801fa8b Mon Sep 17 00:00:00 2001 From: Dylan Hunt Date: Thu, 28 Sep 2023 15:29:33 +0800 Subject: [PATCH 2/5] chore: autogen --- src/Assets/Resources/PerformanceTestRunInfo.json | 1 + src/Assets/Resources/PerformanceTestRunInfo.json.meta | 7 +++++++ src/Assets/Resources/PerformanceTestRunSettings.json | 1 + src/Assets/Resources/PerformanceTestRunSettings.json.meta | 7 +++++++ 4 files changed, 16 insertions(+) create mode 100644 src/Assets/Resources/PerformanceTestRunInfo.json create mode 100644 src/Assets/Resources/PerformanceTestRunInfo.json.meta create mode 100644 src/Assets/Resources/PerformanceTestRunSettings.json create mode 100644 src/Assets/Resources/PerformanceTestRunSettings.json.meta diff --git a/src/Assets/Resources/PerformanceTestRunInfo.json b/src/Assets/Resources/PerformanceTestRunInfo.json new file mode 100644 index 0000000..8a58086 --- /dev/null +++ b/src/Assets/Resources/PerformanceTestRunInfo.json @@ -0,0 +1 @@ +{"TestSuite":"","Date":0,"Player":{"Development":false,"ScreenWidth":0,"ScreenHeight":0,"ScreenRefreshRate":0,"Fullscreen":false,"Vsync":0,"AntiAliasing":0,"Batchmode":false,"RenderThreadingMode":"GraphicsJobs","GpuSkinning":true,"Platform":"","ColorSpace":"","AnisotropicFiltering":"","BlendWeights":"","GraphicsApi":"","ScriptingBackend":"Mono2x","AndroidTargetSdkVersion":"AndroidApiLevelAuto","AndroidBuildSystem":"Gradle","BuildTarget":"StandaloneWindows64","StereoRenderingPath":"MultiPass"},"Hardware":{"OperatingSystem":"","DeviceModel":"","DeviceName":"","ProcessorType":"","ProcessorCount":0,"GraphicsDeviceName":"","SystemMemorySizeMB":0},"Editor":{"Version":"2022.3.5f1","Branch":"2022.3/release","Changeset":"9674261d40ee","Date":1689070707},"Dependencies":["com.unity.2d.sprite@1.0.0","com.unity.ai.navigation@1.1.4","com.unity.feature.development@1.0.1","com.unity.ide.rider@3.0.24","com.unity.ide.visualstudio@2.0.20","com.unity.ide.vscode@1.2.5","com.unity.multiplayer.tools@1.0.0","com.unity.netcode.gameobjects@1.5.2","com.unity.nuget.newtonsoft-json@3.2.1","com.unity.render-pipelines.universal@14.0.8","com.unity.test-framework@1.1.33","com.unity.textmeshpro@3.0.6","com.unity.toolchain.win-x86_64-linux-x86_64@2.0.6","com.unity.transport@2.1.0","com.unity.ugui@1.0.0","com.unity.visualscripting@1.8.0","com.unity.modules.ai@1.0.0","com.unity.modules.androidjni@1.0.0","com.unity.modules.animation@1.0.0","com.unity.modules.assetbundle@1.0.0","com.unity.modules.audio@1.0.0","com.unity.modules.cloth@1.0.0","com.unity.modules.director@1.0.0","com.unity.modules.imageconversion@1.0.0","com.unity.modules.imgui@1.0.0","com.unity.modules.jsonserialize@1.0.0","com.unity.modules.particlesystem@1.0.0","com.unity.modules.physics@1.0.0","com.unity.modules.physics2d@1.0.0","com.unity.modules.screencapture@1.0.0","com.unity.modules.terrain@1.0.0","com.unity.modules.terrainphysics@1.0.0","com.unity.modules.tilemap@1.0.0","com.unity.modules.ui@1.0.0","com.unity.modules.uielements@1.0.0","com.unity.modules.umbra@1.0.0","com.unity.modules.unityanalytics@1.0.0","com.unity.modules.unitywebrequest@1.0.0","com.unity.modules.unitywebrequestassetbundle@1.0.0","com.unity.modules.unitywebrequestaudio@1.0.0","com.unity.modules.unitywebrequesttexture@1.0.0","com.unity.modules.unitywebrequestwww@1.0.0","com.unity.modules.vehicles@1.0.0","com.unity.modules.video@1.0.0","com.unity.modules.vr@1.0.0","com.unity.modules.wind@1.0.0","com.unity.modules.xr@1.0.0","com.unity.asset-store-tools@11.2.2","com.unity.modules.subsystems@1.0.0","com.unity.collections@2.2.1","com.unity.burst@1.8.8","com.unity.mathematics@1.3.1","com.unity.sysroot@2.0.7","com.unity.sysroot.linux-x86_64@2.0.6","com.unity.ext.nunit@1.0.6","com.unity.render-pipelines.core@14.0.8","com.unity.shadergraph@14.0.8","com.unity.nuget.mono-cecil@1.11.4","com.unity.profiling.core@1.0.2","com.unity.editorcoroutines@1.0.0","com.unity.performance.profile-analyzer@1.2.2","com.unity.testtools.codecoverage@1.2.4","com.unity.test-framework.performance@3.0.2","com.unity.searcher@4.9.2","com.unity.settings-manager@2.0.1"],"Results":[]} \ No newline at end of file diff --git a/src/Assets/Resources/PerformanceTestRunInfo.json.meta b/src/Assets/Resources/PerformanceTestRunInfo.json.meta new file mode 100644 index 0000000..da798fb --- /dev/null +++ b/src/Assets/Resources/PerformanceTestRunInfo.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 969eaf5cfbc350b4a81c8644da6580f3 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/src/Assets/Resources/PerformanceTestRunSettings.json b/src/Assets/Resources/PerformanceTestRunSettings.json new file mode 100644 index 0000000..49438ae --- /dev/null +++ b/src/Assets/Resources/PerformanceTestRunSettings.json @@ -0,0 +1 @@ +{"MeasurementCount":-1} \ No newline at end of file diff --git a/src/Assets/Resources/PerformanceTestRunSettings.json.meta b/src/Assets/Resources/PerformanceTestRunSettings.json.meta new file mode 100644 index 0000000..8d0059e --- /dev/null +++ b/src/Assets/Resources/PerformanceTestRunSettings.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 85a355e8726c1f8439157912f884cc0b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: From 0fe085931761a55acc0795a23e1e54ceb04a7f66 Mon Sep 17 00:00:00 2001 From: Dylan Hunt Date: Thu, 28 Sep 2023 15:51:06 +0800 Subject: [PATCH 3/5] chore: Autogen --- src/Assets/Resources/PerformanceTestRunInfo.json | 1 - src/Assets/Resources/PerformanceTestRunInfo.json.meta | 7 ------- src/Assets/Resources/PerformanceTestRunSettings.json | 1 - src/Assets/Resources/PerformanceTestRunSettings.json.meta | 7 ------- 4 files changed, 16 deletions(-) delete mode 100644 src/Assets/Resources/PerformanceTestRunInfo.json delete mode 100644 src/Assets/Resources/PerformanceTestRunInfo.json.meta delete mode 100644 src/Assets/Resources/PerformanceTestRunSettings.json delete mode 100644 src/Assets/Resources/PerformanceTestRunSettings.json.meta diff --git a/src/Assets/Resources/PerformanceTestRunInfo.json b/src/Assets/Resources/PerformanceTestRunInfo.json deleted file mode 100644 index 8a58086..0000000 --- a/src/Assets/Resources/PerformanceTestRunInfo.json +++ /dev/null @@ -1 +0,0 @@ -{"TestSuite":"","Date":0,"Player":{"Development":false,"ScreenWidth":0,"ScreenHeight":0,"ScreenRefreshRate":0,"Fullscreen":false,"Vsync":0,"AntiAliasing":0,"Batchmode":false,"RenderThreadingMode":"GraphicsJobs","GpuSkinning":true,"Platform":"","ColorSpace":"","AnisotropicFiltering":"","BlendWeights":"","GraphicsApi":"","ScriptingBackend":"Mono2x","AndroidTargetSdkVersion":"AndroidApiLevelAuto","AndroidBuildSystem":"Gradle","BuildTarget":"StandaloneWindows64","StereoRenderingPath":"MultiPass"},"Hardware":{"OperatingSystem":"","DeviceModel":"","DeviceName":"","ProcessorType":"","ProcessorCount":0,"GraphicsDeviceName":"","SystemMemorySizeMB":0},"Editor":{"Version":"2022.3.5f1","Branch":"2022.3/release","Changeset":"9674261d40ee","Date":1689070707},"Dependencies":["com.unity.2d.sprite@1.0.0","com.unity.ai.navigation@1.1.4","com.unity.feature.development@1.0.1","com.unity.ide.rider@3.0.24","com.unity.ide.visualstudio@2.0.20","com.unity.ide.vscode@1.2.5","com.unity.multiplayer.tools@1.0.0","com.unity.netcode.gameobjects@1.5.2","com.unity.nuget.newtonsoft-json@3.2.1","com.unity.render-pipelines.universal@14.0.8","com.unity.test-framework@1.1.33","com.unity.textmeshpro@3.0.6","com.unity.toolchain.win-x86_64-linux-x86_64@2.0.6","com.unity.transport@2.1.0","com.unity.ugui@1.0.0","com.unity.visualscripting@1.8.0","com.unity.modules.ai@1.0.0","com.unity.modules.androidjni@1.0.0","com.unity.modules.animation@1.0.0","com.unity.modules.assetbundle@1.0.0","com.unity.modules.audio@1.0.0","com.unity.modules.cloth@1.0.0","com.unity.modules.director@1.0.0","com.unity.modules.imageconversion@1.0.0","com.unity.modules.imgui@1.0.0","com.unity.modules.jsonserialize@1.0.0","com.unity.modules.particlesystem@1.0.0","com.unity.modules.physics@1.0.0","com.unity.modules.physics2d@1.0.0","com.unity.modules.screencapture@1.0.0","com.unity.modules.terrain@1.0.0","com.unity.modules.terrainphysics@1.0.0","com.unity.modules.tilemap@1.0.0","com.unity.modules.ui@1.0.0","com.unity.modules.uielements@1.0.0","com.unity.modules.umbra@1.0.0","com.unity.modules.unityanalytics@1.0.0","com.unity.modules.unitywebrequest@1.0.0","com.unity.modules.unitywebrequestassetbundle@1.0.0","com.unity.modules.unitywebrequestaudio@1.0.0","com.unity.modules.unitywebrequesttexture@1.0.0","com.unity.modules.unitywebrequestwww@1.0.0","com.unity.modules.vehicles@1.0.0","com.unity.modules.video@1.0.0","com.unity.modules.vr@1.0.0","com.unity.modules.wind@1.0.0","com.unity.modules.xr@1.0.0","com.unity.asset-store-tools@11.2.2","com.unity.modules.subsystems@1.0.0","com.unity.collections@2.2.1","com.unity.burst@1.8.8","com.unity.mathematics@1.3.1","com.unity.sysroot@2.0.7","com.unity.sysroot.linux-x86_64@2.0.6","com.unity.ext.nunit@1.0.6","com.unity.render-pipelines.core@14.0.8","com.unity.shadergraph@14.0.8","com.unity.nuget.mono-cecil@1.11.4","com.unity.profiling.core@1.0.2","com.unity.editorcoroutines@1.0.0","com.unity.performance.profile-analyzer@1.2.2","com.unity.testtools.codecoverage@1.2.4","com.unity.test-framework.performance@3.0.2","com.unity.searcher@4.9.2","com.unity.settings-manager@2.0.1"],"Results":[]} \ No newline at end of file diff --git a/src/Assets/Resources/PerformanceTestRunInfo.json.meta b/src/Assets/Resources/PerformanceTestRunInfo.json.meta deleted file mode 100644 index da798fb..0000000 --- a/src/Assets/Resources/PerformanceTestRunInfo.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 969eaf5cfbc350b4a81c8644da6580f3 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/src/Assets/Resources/PerformanceTestRunSettings.json b/src/Assets/Resources/PerformanceTestRunSettings.json deleted file mode 100644 index 49438ae..0000000 --- a/src/Assets/Resources/PerformanceTestRunSettings.json +++ /dev/null @@ -1 +0,0 @@ -{"MeasurementCount":-1} \ No newline at end of file diff --git a/src/Assets/Resources/PerformanceTestRunSettings.json.meta b/src/Assets/Resources/PerformanceTestRunSettings.json.meta deleted file mode 100644 index 8d0059e..0000000 --- a/src/Assets/Resources/PerformanceTestRunSettings.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 85a355e8726c1f8439157912f884cc0b -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: From 345f0e001bb3231d2f2cd807308cbfc2be876291 Mon Sep 17 00:00:00 2001 From: Dylan Hunt Date: Thu, 28 Sep 2023 15:51:16 +0800 Subject: [PATCH 4/5] doc: Quick log typo fix --- src/Assets/HathoraNgo/Scripts/NgoStateMgr.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Assets/HathoraNgo/Scripts/NgoStateMgr.cs b/src/Assets/HathoraNgo/Scripts/NgoStateMgr.cs index d6ce31e..c5900e3 100644 --- a/src/Assets/HathoraNgo/Scripts/NgoStateMgr.cs +++ b/src/Assets/HathoraNgo/Scripts/NgoStateMgr.cs @@ -185,7 +185,7 @@ public bool StartClient(string _hostPort) /// public bool StartClient() { - string logPrefix = $"[{nameof(NgoStateMgr)}.{nameof(StartClient)}"; + string logPrefix = $"[{nameof(NgoStateMgr)}.{nameof(StartClient)}]"; Debug.Log($"{logPrefix} Start"); // Validate @@ -196,7 +196,7 @@ public bool StartClient() // Log "host:port (transport)" -> Connect using NetworkManager settings string ipPort = $"{transport.ConnectionData.Address}:{transport.ConnectionData.Port}"; string transportName = transport.GetType().Name; - Debug.Log($"[{logPrefix} Connecting to `{ipPort}` via`{transportName}` transport"); + Debug.Log($"{logPrefix} Connecting to `{ipPort}` via`{transportName}` transport"); base.OnClientConnecting(); // => callback @ OnClientConected() || OnLocalStartClientFail() bool startedConnection = netMgr.StartClient(); From 55478d6b8324a0d37e3345046cea7bd874c7c8b0 Mon Sep 17 00:00:00 2001 From: Dylan Hunt Date: Thu, 28 Sep 2023 16:34:17 +0800 Subject: [PATCH 5/5] chore: Disable WS by default --- src/Assets/HathoraNgo/Scenes/HathoraDemoScene-Ngo.unity | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Assets/HathoraNgo/Scenes/HathoraDemoScene-Ngo.unity b/src/Assets/HathoraNgo/Scenes/HathoraDemoScene-Ngo.unity index d4732b7..1abdcdf 100644 --- a/src/Assets/HathoraNgo/Scenes/HathoraDemoScene-Ngo.unity +++ b/src/Assets/HathoraNgo/Scenes/HathoraDemoScene-Ngo.unity @@ -4799,8 +4799,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_ProtocolType: 0 - m_UseWebSockets: 1 - m_UseEncryption: 1 + m_UseWebSockets: 0 + m_UseEncryption: 0 m_MaxPacketQueueSize: 128 m_MaxPayloadSize: 6144 m_HeartbeatTimeoutMS: 500