diff --git a/packages/org.gamecult.eve.unity-scene/Runtime/CultMesh/EveUnityCultMeshLiveProviderTransport.cs b/packages/org.gamecult.eve.unity-scene/Runtime/CultMesh/EveUnityCultMeshLiveProviderTransport.cs index c1d220f..125a956 100644 --- a/packages/org.gamecult.eve.unity-scene/Runtime/CultMesh/EveUnityCultMeshLiveProviderTransport.cs +++ b/packages/org.gamecult.eve.unity-scene/Runtime/CultMesh/EveUnityCultMeshLiveProviderTransport.cs @@ -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( - recordKeys: new[] { handle.RecordKey.Value }, - schemaIds: new[] { CultMeshBodyPublicationSchemaVersions.Publication }) - .GetAwaiter().GetResult().FirstOrDefault() + var publication = _node!.Database.Cache.Get(handle.RecordKey) + ?? _snapshot! + .FetchDocumentsAsync( + 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 }, diff --git a/packages/org.gamecult.eve.unity-scene/package.json b/packages/org.gamecult.eve.unity-scene/package.json index 149290e..35e0a9a 100644 --- a/packages/org.gamecult.eve.unity-scene/package.json +++ b/packages/org.gamecult.eve.unity-scene/package.json @@ -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": {