Vixen
02b45cc4
csharp
public sealed class MapLifetime

A shard is a map, and a map is content. This is the join, and it is deliberately thin.

Read the guide page for this →

Remarks

Doc 27 § The scene-management join describes a chain in which every link already exists: RealmSpec.Map is an addressable address, AssetManager resolves it to a SceneAsset, SceneManager loads that into a world, and NetworkSceneId is the hash of the scene's name — so a client that has loaded the map already agrees with the realm about what the props are before a packet arrives.

⚠ So this class does not load anything, and that is the point. The host already opens AppConfig.StartupScene before OnInitialise, reports its own failures and survives them; a realm that loaded the map a second way would be a second code path for content failures, tested half as often. What is left over — and what the realm genuinely needs — is the question "is the map up yet", because that is what separates Starting from Ready, and nothing in the host answers it.

Fields and properties (5)

  • public string Address

    The address the shard was told to be.

  • public string SceneName

    The scene's name — the address's leaf, which is what NetworkSceneId hashes.

  • public MapState State

    Where it is.

  • public SceneHandle Scene

    The loaded scene, once there is one.

  • public bool IsReady

    Whether the realm may report itself ready.

Methods (5)

  • public MapLifetime(ShardKey key)

    Names the map a shard carries.

  • public bool Resolve(SceneManager? scenes)

    Looks for the map among the scenes the host has loaded.

  • public void Ready(SceneHandle scene)

    Says the map is up, when the realm loaded it some other way.

  • public void Quiesce()

    Stops taking arrivals. The map keeps simulating.

  • public int Unload(SceneManager? scenes)

    Takes the map out of the world.

Used by (7)

  • MapAndHeartbeatTestsVixen.Live.Realm.Tests
  • RealmVixen.Live.Realm
  • RealmVixen.Live.Realm.Tests
  • RealmClusterTestsVixen.Live.Realm.Cluster.Tests
  • RealmFixtureVixen.Live.Realm.Tests
  • RealmHostVixen.Live.Realm
  • RealmHostTestsVixen.Live.Realm.Tests