Add Unity state runtime package boundary
This commit is contained in:
parent
c8fd1d5e22
commit
7558b8559b
7 changed files with 57 additions and 21 deletions
Binary file not shown.
|
|
@ -8,6 +8,7 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using Cinemachine;
|
||||
using GameCult.Aetheria.State.Unity;
|
||||
using Ink;
|
||||
using Ink.Runtime;
|
||||
using TMPro;
|
||||
|
|
@ -35,7 +36,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
get => _gameDataDirectory ??= new DirectoryInfo(Application.dataPath).Parent.CreateSubdirectory("GameData");
|
||||
}
|
||||
|
||||
public static string AetheriaStateFilePath => AetheriaStateBoundary.GetStateFilePath(GameDataDirectory);
|
||||
public static string AetheriaStateFilePath => AetheriaRuntimeStateBoundary.GetStateFilePath(GameDataDirectory);
|
||||
private static string LegacyAetherDatabasePath => LegacyCatalogBoundary.GetLegacyCatalogPath(GameDataDirectory);
|
||||
private static ILegacyCatalogReader LegacyCatalog => LegacyCatalogBoundary.GetCatalog(GameDataDirectory);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
using System.IO;
|
||||
|
||||
public static class AetheriaStateBoundary
|
||||
{
|
||||
public const string RuntimeStateFileName = "aetheria-world.cc";
|
||||
|
||||
public static string GetStateFilePath(DirectoryInfo gameDataDirectory)
|
||||
{
|
||||
return Path.Combine(gameDataDirectory.FullName, RuntimeStateFileName);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using System.IO;
|
||||
|
||||
namespace GameCult.Aetheria.State.Unity
|
||||
{
|
||||
public static class AetheriaRuntimeStateBoundary
|
||||
{
|
||||
public const string RuntimeStateFileName = "aetheria-world.cc";
|
||||
|
||||
public static string GetStateFilePath(DirectoryInfo gameDataDirectory)
|
||||
{
|
||||
return Path.Combine(gameDataDirectory.FullName, RuntimeStateFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "GameCult.Aetheria.State.Unity",
|
||||
"rootNamespace": "GameCult.Aetheria.State.Unity",
|
||||
"references": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
||||
15
Packages/org.gamecult.aetheria.state/package.json
Normal file
15
Packages/org.gamecult.aetheria.state/package.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"name": "org.gamecult.aetheria.state",
|
||||
"displayName": "Aetheria State Runtime",
|
||||
"version": "0.1.0",
|
||||
"unity": "2021.3",
|
||||
"description": "Unity runtime boundary for Aetheria typed CultCache state and future CultMesh catalog boot.",
|
||||
"keywords": [
|
||||
"Aetheria",
|
||||
"CultCache",
|
||||
"CultMesh",
|
||||
"State"
|
||||
],
|
||||
"license": "MPL-2.0",
|
||||
"category": "Scripting"
|
||||
}
|
||||
|
|
@ -21,12 +21,14 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
|
|||
item/name catalog through a private `ActionGameManager` boot helper, which is
|
||||
now the only runtime entrypoint that calls `LegacyCatalogBoundary.GetCatalog`.
|
||||
`ActionGameManager` no longer owns a global legacy cache.
|
||||
`AetheriaStateBoundary` owns the Unity runtime path to
|
||||
`GameData/aetheria-world.cc`; `LegacyCatalogBoundary` no longer names or owns
|
||||
typed state paths. Local run saves, loadouts, player settings files, zone
|
||||
files, and generated keyboard layout caches no longer write bespoke durable
|
||||
files. The legacy `PlayerSettings` runtime object is no longer decorated as a
|
||||
MessagePack persistence shape.
|
||||
`GameCult.Aetheria.State.Unity`, the embedded Unity package under
|
||||
`Packages/org.gamecult.aetheria.state`, owns the Unity runtime path to
|
||||
`GameData/aetheria-world.cc` through `AetheriaRuntimeStateBoundary`;
|
||||
`LegacyCatalogBoundary` no longer names or owns typed state paths. Local run
|
||||
saves, loadouts, player settings files, zone files, and generated keyboard
|
||||
layout caches no longer write bespoke durable files. The legacy
|
||||
`PlayerSettings` runtime object is no longer decorated as a MessagePack
|
||||
persistence shape.
|
||||
- Shared domain state is still partly built around `DatabaseEntry`, GUID
|
||||
identity, MessagePack attributes, and static cache references. Newtonsoft,
|
||||
JsonKnownTypes, RethinkDB, LiteNetLib client transport, and the broken
|
||||
|
|
@ -129,8 +131,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
|
|||
- `GameData/aetheria-world.cc` is now materialized from the importer as the
|
||||
project-local typed state file for the checked-in catalog. The importer stores
|
||||
relative provenance in the state document, not machine-local absolute paths.
|
||||
Unity resolves this path through `AetheriaStateBoundary`, not through the
|
||||
legacy catalog boundary.
|
||||
Unity resolves this path through the embedded `GameCult.Aetheria.State.Unity`
|
||||
runtime package, not through the legacy catalog boundary.
|
||||
Import rebuilds clear the generated `.cc`, `.cc.records`, and `.cultmesh`
|
||||
outputs for the selected state path after capturing legacy inputs, so schema
|
||||
evolution can rematerialize typed state instead of being blocked by stale
|
||||
|
|
@ -194,7 +196,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
|
|||
## Current Authority Map
|
||||
|
||||
- Owner: `Aetheria.State` owns the new typed state spine for durable state.
|
||||
`AetheriaStateBoundary` owns Unity's runtime typed state file path.
|
||||
The embedded `GameCult.Aetheria.State.Unity` package owns Unity's runtime
|
||||
typed state file path and is the landing zone for future typed catalog boot.
|
||||
`LegacyCatalogBoundary` is the only named owner for opening the old catalog
|
||||
and binding legacy `DatabaseLink<T>` resolution until catalog migration lands.
|
||||
`ActionGameManager` has a private boot helper that calls it only to construct
|
||||
|
|
|
|||
Loading…
Reference in a new issue