From d2eb22160b17cd967cc822cdbce2e841d131e02b Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 28 Jun 2026 22:39:32 +0100 Subject: [PATCH] Use reactive documents during Unity boot --- Aetheria.State.Verify/Program.cs | 46 +++++++++---------- .../AetheriaUnityGameplayBootShell.cs | 9 ++-- .../AetheriaUnityRuntimeClientProvider.cs | 5 +- 3 files changed, 31 insertions(+), 29 deletions(-) diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index 9ed6bbf29..fdc740027 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -8773,10 +8773,10 @@ static void RequireClientTargetBootAuthority(string root) "stateBoot.StateFileExists", "AetheriaUnityRuntimeClientProvider.ResolveClient(stateBoot.StateFilePath, stateBoot.RuntimeId)", ".State", - ".ObserveCatalog()", - "runtimeCatalogSession.Current", - ".ObserveSectorMap()", - "sectorMapSession.Current", + ".ReactiveCatalog()", + "runtimeCatalogDocument.Current", + ".ReactiveSectorMap()", + "sectorMapDocument.Current", "new ItemManager(", "new AetheriaUnityLoadoutItemFactory(itemManager, runtimeCatalog)", "ZoneRenderer.SetDroppedPickupItemFactory(loadoutItemFactory.CreateLoadoutItem)", @@ -8796,11 +8796,11 @@ static void RequireClientTargetBootAuthority(string root) string.Join(", ", missingGameplayBootShellSymbols)); } - if (gameplayBootShell.Contains(".ReactiveCatalog()", StringComparison.Ordinal) || - gameplayBootShell.Contains(".ReactiveSectorMap()", StringComparison.Ordinal)) + if (gameplayBootShell.Contains(".ObserveCatalog()", StringComparison.Ordinal) || + gameplayBootShell.Contains(".ObserveSectorMap()", StringComparison.Ordinal)) { throw new InvalidOperationException( - "AetheriaUnityGameplayBootShell still opens raw reactive catalog/sector map documents instead of managed sessions."); + "AetheriaUnityGameplayBootShell still routes boot catalog/sector-map reads through legacy session wrappers instead of reactive typed documents."); } var requiredPresenterSymbols = new[] @@ -15402,10 +15402,10 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) "AetheriaRuntimeStateBoot.Inspect(AetheriaUnityRuntimePaths.GameDataDirectory)", "AetheriaUnityRuntimeClientProvider.ResolveClient(stateBoot.StateFilePath, stateBoot.RuntimeId)", ".State", - ".ObserveCatalog()", - "runtimeCatalogSession.Current", - ".ObserveSectorMap()", - "sectorMapSession.Current", + ".ReactiveCatalog()", + "runtimeCatalogDocument.Current", + ".ReactiveSectorMap()", + "sectorMapDocument.Current", "new ItemManager(", "new AetheriaUnityLoadoutItemFactory(itemManager, runtimeCatalog)", "ZoneRenderer.SetDroppedPickupItemFactory(loadoutItemFactory.CreateLoadoutItem)", @@ -15427,17 +15427,17 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) string.Join(", ", missingGameplayBootShellSymbols)); } - if (gameplayBootShell.Contains(".ReactiveCatalog()", StringComparison.Ordinal) || - gameplayBootShell.Contains(".ReactiveSectorMap()", StringComparison.Ordinal)) + if (gameplayBootShell.Contains(".ObserveCatalog()", StringComparison.Ordinal) || + gameplayBootShell.Contains(".ObserveSectorMap()", StringComparison.Ordinal)) { throw new InvalidOperationException( - "AetheriaUnityGameplayBootShell still opens raw reactive catalog/sector map documents instead of managed sessions."); + "AetheriaUnityGameplayBootShell still routes boot catalog/sector-map reads through legacy session wrappers instead of reactive typed documents."); } var requiredRuntimeClientProviderSymbols = new[] { "public static class AetheriaUnityRuntimeClientProvider", - "private static AetheriaRuntimePlayerSettingsSession _playerSettingsDocument", + "private static CultMeshReactiveDocument _playerSettingsDocument", "public static RuntimePlayerSettings PlayerSettings", "public static AetheriaClient ResolveClient(string stateFilePath, string runtimeId = \"\")", "public static AetheriaClient ResolveClient(AetheriaRuntimeStateBootReport stateBoot, string runtimeId = \"\")", @@ -15448,7 +15448,7 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) "AetheriaClient", ".State", ".Settings", - ".ObservePlayer()", + ".ReactivePlayer()", "_playerSettingsDocument.Current", "_playerSettingsDocument?.Dispose()", "OpenAsync(", @@ -15465,11 +15465,11 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) string.Join(", ", missingRuntimeClientProviderSymbols)); } - if (runtimeClientProvider.Contains("CultMeshReactiveDocument _playerSettingsDocument", StringComparison.Ordinal) || - runtimeClientProvider.Contains(".ReactivePlayer()", StringComparison.Ordinal)) + if (runtimeClientProvider.Contains("AetheriaRuntimePlayerSettingsSession _playerSettingsDocument", StringComparison.Ordinal) || + runtimeClientProvider.Contains(".ObservePlayer()", StringComparison.Ordinal)) { throw new InvalidOperationException( - "AetheriaUnityRuntimeClientProvider still owns the raw player-settings CultMesh document instead of AetheriaRuntimePlayerSettingsSession."); + "AetheriaUnityRuntimeClientProvider still routes player settings through a legacy session wrapper instead of the reactive typed document."); } var providerOwnedClientAccessSources = new Dictionary @@ -15906,10 +15906,10 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) var requiredGameplayBootSymbols = new[] { - ".ObserveCatalog()", - "runtimeCatalogSession.Current", - ".ObserveSectorMap()", - "sectorMapSession.Current", + ".ReactiveCatalog()", + "runtimeCatalogDocument.Current", + ".ReactiveSectorMap()", + "sectorMapDocument.Current", "Galaxy.ProjectObservedSectorMap(", "sectorMap.IsTutorial", "sectorMap.GenerationSeed", diff --git a/Assets/Scripts/Gameplay/AetheriaUnityGameplayBootShell.cs b/Assets/Scripts/Gameplay/AetheriaUnityGameplayBootShell.cs index 82c8518d4..932e3c209 100644 --- a/Assets/Scripts/Gameplay/AetheriaUnityGameplayBootShell.cs +++ b/Assets/Scripts/Gameplay/AetheriaUnityGameplayBootShell.cs @@ -4,6 +4,7 @@ using System; using GameCult.Aetheria.State.Verse; +using GameCult.Mesh; public sealed class AetheriaUnityGameplayBootShell { @@ -36,12 +37,12 @@ public sealed class AetheriaUnityGameplayBootShell var aetheria = AetheriaUnityRuntimeClientProvider.ResolveClient(stateBoot.StateFilePath, stateBoot.RuntimeId) .State; - using var runtimeCatalogSession = aetheria.ObserveCatalog(); - var runtimeCatalog = runtimeCatalogSession.Current; + using var runtimeCatalogDocument = aetheria.ReactiveCatalog(); + var runtimeCatalog = runtimeCatalogDocument.Current; if (runtimeCatalog == null) throw new InvalidOperationException("Aetheria typed runtime catalog is required before gameplay boot."); - using var sectorMapSession = aetheria.ObserveSectorMap(); - var sectorMap = sectorMapSession.Current; + using var sectorMapDocument = aetheria.ReactiveSectorMap(); + var sectorMap = sectorMapDocument.Current; if (sectorMap == null) throw new InvalidOperationException("Aetheria typed sector map is required before gameplay boot."); diff --git a/Assets/Scripts/Gameplay/AetheriaUnityRuntimeClientProvider.cs b/Assets/Scripts/Gameplay/AetheriaUnityRuntimeClientProvider.cs index 6d2f3688f..6899e743d 100644 --- a/Assets/Scripts/Gameplay/AetheriaUnityRuntimeClientProvider.cs +++ b/Assets/Scripts/Gameplay/AetheriaUnityRuntimeClientProvider.cs @@ -6,13 +6,14 @@ using System; using System.Collections.Generic; using System.IO; using GameCult.Aetheria.State.Verse; +using GameCult.Mesh; using UnityEngine; public static class AetheriaUnityRuntimeClientProvider { private static readonly Dictionary RuntimeClients = new Dictionary(StringComparer.Ordinal); - private static AetheriaRuntimePlayerSettingsSession _playerSettingsDocument; + private static CultMeshReactiveDocument _playerSettingsDocument; private static RuntimePlayerSettings _runtimePlayerSettings; private static bool _playerSettingsLoaded; @@ -96,7 +97,7 @@ public static class AetheriaUnityRuntimeClientProvider _playerSettingsDocument ??= ResolveClient(AetheriaUnityRuntimePaths.RuntimeStateFilePath) .State .Settings - .ObservePlayer(); + .ReactivePlayer(); var stored = _playerSettingsDocument.Current; if (stored == null)