Carry entity SoA pointers through Unity lowering

This commit is contained in:
Meta Vens 2026-07-12 11:58:08 +01:00
commit ed0efa6589
2 changed files with 29 additions and 2 deletions

View file

@ -120,7 +120,11 @@ namespace GameCult.Eve.UnityScene
worldRoot.GetProp("focusCommand"),
worldRoot.GetProp("targetCommand"),
worldRoot.GetProp("actionCommand"),
entities);
entities,
worldRoot.GetProp("entityViewPointerId"),
worldRoot.GetProp("entityViewSchema"),
worldRoot.GetProp("zoneRenderPointerId"),
worldRoot.GetProp("zoneRenderSchema"));
}
private static EveUnityPlayableWorldEntity BuildPlayableEntity(EveSurfaceComponent component)
@ -316,7 +320,11 @@ namespace GameCult.Eve.UnityScene
string focusCommand,
string targetCommand,
string actionCommand,
IReadOnlyList<EveUnityPlayableWorldEntity> entities)
IReadOnlyList<EveUnityPlayableWorldEntity> entities,
string entityViewPointerId = "",
string entityViewSchema = "",
string zoneRenderPointerId = "",
string zoneRenderSchema = "")
{
WorldRootId = worldRootId ?? "";
StatePointerId = statePointerId ?? "";
@ -330,12 +338,24 @@ namespace GameCult.Eve.UnityScene
TargetCommand = targetCommand ?? "";
ActionCommand = actionCommand ?? "";
Entities = entities ?? Array.Empty<EveUnityPlayableWorldEntity>();
EntityViewPointerId = entityViewPointerId ?? "";
EntityViewSchema = entityViewSchema ?? "";
ZoneRenderPointerId = zoneRenderPointerId ?? "";
ZoneRenderSchema = zoneRenderSchema ?? "";
}
public string WorldRootId { get; }
public string StatePointerId { get; }
public string EntityViewPointerId { get; }
public string EntityViewSchema { get; }
public string ZoneRenderPointerId { get; }
public string ZoneRenderSchema { get; }
public string AssetManifest { get; }
public string InputProfile { get; }

View file

@ -70,6 +70,9 @@ namespace GameCult.Eve.UnityScene.Tests
Assert.That(projection.PlayableWorld, Is.Not.Null);
Assert.That(projection.PlayableWorld!.WorldRootId, Is.EqualTo("aetheria.daemon.game.playable"));
Assert.That(projection.PlayableWorld.StatePointerId, Is.EqualTo("cultmesh://aetheria/run/current"));
Assert.That(projection.PlayableWorld.EntityViewPointerId, Is.EqualTo("cultmesh://aetheria/world/entities.soa"));
Assert.That(projection.PlayableWorld.EntityViewSchema, Is.EqualTo(EveEntitySoaViewDocument.SchemaId));
Assert.That(projection.PlayableWorld.ZoneRenderPointerId, Is.EqualTo("cultmesh://aetheria/world/zone-render"));
Assert.That(projection.PlayableWorld.AssetManifest, Is.EqualTo("cultmesh://aetheria/assets/manifest"));
Assert.That(projection.PlayableWorld.InputProfile, Is.EqualTo("arpg-third-person"));
Assert.That(projection.PlayableWorld.CameraRig, Is.EqualTo("third-person-orbit"));
@ -1298,6 +1301,10 @@ namespace GameCult.Eve.UnityScene.Tests
new Dictionary<string, string>(StringComparer.Ordinal)
{
["statePointerId"] = "cultmesh://aetheria/run/current",
["entityViewPointerId"] = "cultmesh://aetheria/world/entities.soa",
["entityViewSchema"] = EveEntitySoaViewDocument.SchemaId,
["zoneRenderPointerId"] = "cultmesh://aetheria/world/zone-render",
["zoneRenderSchema"] = "gamecult.aetheria.zone_render.v1",
["assetManifest"] = "cultmesh://aetheria/assets/manifest",
["inputProfile"] = "arpg-third-person",
["cameraRig"] = "third-person-orbit",