diff --git a/ReleaseConsumerProject/Assets/Tests/PlayMode/GenericWorldCaptureTests.cs b/ReleaseConsumerProject/Assets/Tests/PlayMode/GenericWorldCaptureTests.cs index e87d133..d5dc99b 100644 --- a/ReleaseConsumerProject/Assets/Tests/PlayMode/GenericWorldCaptureTests.cs +++ b/ReleaseConsumerProject/Assets/Tests/PlayMode/GenericWorldCaptureTests.cs @@ -180,8 +180,7 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests var lightObject = new GameObject("Generic Eve World Light"); RenderTexture target = null; Texture2D pixels = null; - EveUnityCultMeshLiveProviderTransport transport = null; - EveUnitySceneLiveProviderBridge bridge = null; + EveUnityCultMeshPlayableWorldProvider provider = null; EveUnityPlayableWorldRuntime runtime = null; WitnessReceipt movementReceipt = null; WitnessReceipt focusReceipt = null; @@ -191,27 +190,21 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests try { - var selection = new EveUnityCultMeshProviderDiscovery().Discover( + provider = root.AddComponent(); + provider.Configure( rendezvousEndpoint, + replicaPath, providerId, surfaceId, - "interactive-world"); - Assert.That(selection.VerseId, Is.Not.Empty); - Assert.That(selection.ProviderId, Is.Not.Empty); - Assert.That(selection.SurfaceId, Is.Not.Empty); - transport = new EveUnityCultMeshLiveProviderTransport( - replicaPath, - selection.Endpoint, - selection.ProviderId, - selection.SurfaceId, - $"eve-unity-test-{Guid.NewGuid():N}"); + requiredSurfaceKind: "interactive-world", + clientRuntimeId: $"eve-unity-test-{Guid.NewGuid():N}"); var publicationDeadline = Time.realtimeSinceStartup + 10f; while (true) { var published = false; try { - transport.Refresh(); + provider.Refresh(); published = true; } catch (InvalidOperationException) when (Time.realtimeSinceStartup < publicationDeadline) @@ -220,15 +213,17 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests if (published) break; yield return new WaitForSecondsRealtime(0.1f); } - bridge = new EveUnitySceneLiveProviderBridge(transport); - bridge.Connect(); + Assert.That(provider.Selection, Is.Not.Null); + Assert.That(provider.Selection.VerseId, Is.Not.Empty); + Assert.That(provider.Selection.ProviderId, Is.Not.Empty); + Assert.That(provider.Selection.SurfaceId, Is.Not.Empty); runtime = EveUnityPlayableWorldRuntime.CreateForGameObjectScene( root.transform, - bridge, - bridge, - assetManifestDocuments: null, - receiptSource: bridge, - fallbackAssetProvider: transport); + provider, + provider, + null, + provider, + provider); var initial = runtime.Connect(); Assert.That(initial.ActiveEntities, Is.GreaterThan(0)); Assert.That(runtime.ActiveWorld.PlayerEntityId, Is.Not.Empty); @@ -357,8 +352,6 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests if (target != null) UnityEngine.Object.DestroyImmediate(target); if (pixels != null) UnityEngine.Object.DestroyImmediate(pixels); runtime?.Dispose(); - bridge?.Dispose(); - transport?.Dispose(); UnityEngine.Object.DestroyImmediate(lightObject); UnityEngine.Object.DestroyImmediate(cameraObject); UnityEngine.Object.DestroyImmediate(root); diff --git a/ReleaseConsumerProject/Packages/manifest.json b/ReleaseConsumerProject/Packages/manifest.json index 84912e6..9d0ec36 100644 --- a/ReleaseConsumerProject/Packages/manifest.json +++ b/ReleaseConsumerProject/Packages/manifest.json @@ -7,7 +7,7 @@ "com.unity.modules.uielements": "1.0.0", "org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-source-v1.0.3-r2", "org.gamecult.eve.surface": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.1.0", - "org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.1.0", + "org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.1.1", "org.gamecult.eve.unity-uitoolkit": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-uitoolkit#eveunity-uitoolkit-v0.1.0" }, "testables": [ diff --git a/ReleaseConsumerProject/Packages/packages-lock.json b/ReleaseConsumerProject/Packages/packages-lock.json index 479416d..83b0ca8 100644 --- a/ReleaseConsumerProject/Packages/packages-lock.json +++ b/ReleaseConsumerProject/Packages/packages-lock.json @@ -33,14 +33,14 @@ "hash": "e10821f1cc81f619479c6507438f6a097d1f0ce2" }, "org.gamecult.eve.unity-scene": { - "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.1.0", + "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.1.1", "depth": 0, "source": "git", "dependencies": { "org.gamecult.cultlib": "1.0.3", "org.gamecult.eve.surface": "0.1.0" }, - "hash": "e10821f1cc81f619479c6507438f6a097d1f0ce2" + "hash": "7e65154d7f42cf1c4ac55871c35676e7ccd2e5b2" }, "org.gamecult.eve.unity-uitoolkit": { "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-uitoolkit#eveunity-uitoolkit-v0.1.0",