Expose native Unity indexed document access

This commit is contained in:
Meta Vens 2026-06-29 12:27:34 +01:00
commit 7285a82cb1
6 changed files with 98 additions and 81 deletions

View file

@ -121,11 +121,50 @@ public static class AetheriaUnityRuntimeClientProvider
return RuntimeState(runtimeId).CurrentEntityState();
}
public static AetheriaRuntimeCurrentZoneDocument CurrentZoneState(string runtimeId = "")
{
return RuntimeState(runtimeId).CurrentZoneState();
}
public static AetheriaRuntimeStationRefitDocument CurrentStationRefit(string runtimeId = "")
{
return RuntimeState(runtimeId).CurrentStationRefit();
}
public static AetheriaRuntimeSectorMapDocument CurrentSectorMap(string runtimeId = "")
{
return RuntimeState(runtimeId).CurrentSectorMap();
}
public static AetheriaRuntimeSectorMapDocument CurrentSectorMap(
AetheriaRuntimeStateBootReport stateBoot,
string runtimeId = "")
{
return RuntimeState(stateBoot, runtimeId).CurrentSectorMap();
}
public static AetheriaRuntimeZoneDetailsDocument CurrentZoneDetails(int zoneIndex, string runtimeId = "")
{
return RuntimeState(runtimeId).CurrentZoneDetails(zoneIndex);
}
public static AetheriaRuntimeInventoryDocument CurrentInventory(int entityIndex, string runtimeId = "")
{
return RuntimeState(runtimeId).CurrentInventory(entityIndex);
}
public static AetheriaRuntimeDaemonFrameDocument CurrentDaemonFrame(string runtimeId = "")
{
return RuntimeState(runtimeId).CurrentDaemonFrame();
}
public static AetheriaRuntimeVerseHostSettingsDocument CurrentVerseHostSettings(
AetheriaRuntimeStateBootReport stateBoot,
string runtimeId = "")
{
return RuntimeState(stateBoot, runtimeId).CurrentVerseHostSettings();
}
public static AetheriaControl Control(string runtimeId = "")
{
return RuntimeClient(runtimeId).Control;

View file

@ -890,9 +890,7 @@ public class InventoryMenu : MonoBehaviour
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-inventory-menu")
.CurrentEntityState();
return AetheriaUnityRuntimeClientProvider.CurrentEntityState("unity-inventory-menu");
}
catch (Exception ex)
{
@ -905,9 +903,7 @@ public class InventoryMenu : MonoBehaviour
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-inventory-menu")
.CurrentStationRefit();
return AetheriaUnityRuntimeClientProvider.CurrentStationRefit("unity-inventory-menu");
}
catch (Exception ex)
{
@ -920,9 +916,7 @@ public class InventoryMenu : MonoBehaviour
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-inventory-menu")
.CurrentInventory(entityIndex);
return AetheriaUnityRuntimeClientProvider.CurrentInventory(entityIndex, "unity-inventory-menu");
}
catch (Exception ex)
{
@ -987,9 +981,7 @@ public class InventoryMenu : MonoBehaviour
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-inventory-menu")
.CurrentCatalog();
return AetheriaUnityRuntimeClientProvider.CurrentCatalog("unity-inventory-menu");
}
catch (Exception ex)
{
@ -1002,9 +994,7 @@ public class InventoryMenu : MonoBehaviour
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-inventory-menu")
.CurrentPlayerSettings();
return AetheriaUnityRuntimeClientProvider.CurrentPlayerSettings("unity-inventory-menu");
}
catch (Exception ex)
{

View file

@ -1444,9 +1444,7 @@ private void Update()
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-inventory")
.CurrentEntityState();
return AetheriaUnityRuntimeClientProvider.CurrentEntityState("unity-inventory");
}
catch (Exception ex)
{
@ -1459,9 +1457,7 @@ private void Update()
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-inventory")
.CurrentStationRefit();
return AetheriaUnityRuntimeClientProvider.CurrentStationRefit("unity-inventory");
}
catch (Exception ex)
{
@ -1481,9 +1477,7 @@ private void Update()
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-inventory")
.CurrentDaemonFrame();
return AetheriaUnityRuntimeClientProvider.CurrentDaemonFrame("unity-inventory");
}
catch (Exception ex)
{
@ -1496,9 +1490,7 @@ private void Update()
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-inventory")
.CurrentInventory(entityIndex);
return AetheriaUnityRuntimeClientProvider.CurrentInventory(entityIndex, "unity-inventory");
}
catch (Exception ex)
{
@ -1511,9 +1503,7 @@ private void Update()
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-inventory")
.CurrentCatalog();
return AetheriaUnityRuntimeClientProvider.CurrentCatalog("unity-inventory");
}
catch (Exception ex)
{
@ -1526,9 +1516,7 @@ private void Update()
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-inventory")
.CurrentPlayerSettings();
return AetheriaUnityRuntimeClientProvider.CurrentPlayerSettings("unity-inventory");
}
catch (Exception ex)
{

View file

@ -220,8 +220,7 @@ public class SectorMap : MonoBehaviour
private void EnsureSectorMapLoaded()
{
_sectorMap = AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-sector-map")
.CurrentSectorMap();
.CurrentSectorMap("unity-sector-map");
if (_sectorMapLoaded)
return;

View file

@ -161,9 +161,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
try
{
var sectorMap = AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-sector-renderer")
.CurrentSectorMap();
var sectorMap = AetheriaUnityRuntimeClientProvider.CurrentSectorMap("unity-sector-renderer");
return (sectorMap?.Zones ?? Array.Empty<AetheriaRuntimeSectorMapZone>())
.FirstOrDefault(zone => zone.ZoneIndex == zoneIndex);
}
@ -186,9 +184,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-sector-renderer")
.CurrentZoneDetails(zoneIndex);
return AetheriaUnityRuntimeClientProvider.CurrentZoneDetails(zoneIndex, "unity-sector-renderer");
}
catch (Exception ex)
{
@ -207,9 +203,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-sector-renderer")
.CurrentCatalog();
return AetheriaUnityRuntimeClientProvider.CurrentCatalog("unity-sector-renderer");
}
catch (Exception ex)
{
@ -222,9 +216,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-sector-renderer")
.CurrentPlayerSettings();
return AetheriaUnityRuntimeClientProvider.CurrentPlayerSettings("unity-sector-renderer");
}
catch (Exception ex)
{
@ -267,9 +259,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-sector-renderer")
.CurrentZoneState();
return AetheriaUnityRuntimeClientProvider.CurrentZoneState("unity-sector-renderer");
}
catch (Exception ex)
{