Resolve SoA publications from the live replica

This commit is contained in:
Meta Vens 2026-07-13 23:16:07 +01:00
commit 79acb10434
2 changed files with 11 additions and 6 deletions

View file

@ -374,11 +374,12 @@ namespace GameCult.Eve.UnityScene
if (document.Buffers == null || document.Buffers.Length == 0)
throw new InvalidOperationException("Entity layout does not name a primary logical buffer.");
var handle = BodyPublicationHandle(document);
var publication = _snapshot!
.FetchDocumentsAsync<CultMeshBodyPublicationDocument>(
recordKeys: new[] { handle.RecordKey.Value },
schemaIds: new[] { CultMeshBodyPublicationSchemaVersions.Publication })
.GetAwaiter().GetResult().FirstOrDefault()
var publication = _node!.Database.Cache.Get<CultMeshBodyPublicationDocument>(handle.RecordKey)
?? _snapshot!
.FetchDocumentsAsync<CultMeshBodyPublicationDocument>(
recordKeys: new[] { handle.RecordKey.Value },
schemaIds: new[] { CultMeshBodyPublicationSchemaVersions.Publication })
.GetAwaiter().GetResult().FirstOrDefault()
?? throw new InvalidOperationException(
$"Provider did not publish CultMesh body generation '{handle.RecordKey.Value}'.");
handle.Validate(publication);
@ -489,6 +490,10 @@ namespace GameCult.Eve.UnityScene
schemaIds: new[] { EveSurfaceDocument.SchemaId },
includeSnapshot: false)
.GetAwaiter().GetResult();
_subscriptions.SubscribeAsync(
"eve-unity-body-publications",
schemaIds: new[] { CultMeshBodyPublicationSchemaVersions.Publication })
.GetAwaiter().GetResult();
_subscriptions.SubscribeAsync(
"eve-unity-receipts",
schemaIds: new[] { EveCommandReceiptDocument.SchemaId },

View file

@ -1,7 +1,7 @@
{
"name": "org.gamecult.eve.unity-scene",
"displayName": "Eve Unity Scene Lowering",
"version": "0.3.9",
"version": "0.3.10",
"unity": "2021.3",
"description": "Provider-agnostic Unity scene shell for gamecult.eve.surface.v1 interactive world surfaces.",
"dependencies": {