public readonly record struct ShardKeyWhat makes two shards interchangeable: a map, a region and a version pair.
Remarks
Every hard filter in doc 27 § Placement is a comparison against this one value — shard.Version == request.BuildVersion, shard.Content == request.ContentHash, shard.Region == request.Region — so naming the tuple makes "the set of shards a player could be sent to" a dictionary lookup rather than a scan with four predicates. Everything the score then weighs (who is already there, how full it is, how old it is) is a property of a shard within one key.
Region is an opaque string and the engine never interprets it (M-Q5). Every game has latency zones and no two of them mean the same thing by "EU"; what the engine can usefully promise is that it will never place a player across one.
Fields and properties (5)
public RealmVersion VersionThe build and content pair a client must match (ADR-022).
public string MapThe map's address. Null only on default; see RealmInstanceId.
public string RegionThe latency zone. Null only on default.
public bool IsValidWhether this names a placeable set at all.
public string SceneNameThe map's leaf name — what NetworkSceneId hashes and what a loaded scene is called.
Methods (4)
public ShardKey(string Map, string Region, RealmVersion Version)What makes two shards interchangeable: a map, a region and a version pair.
public bool Equals(ShardKey other)Whether two keys name the same interchangeable set.
public override int GetHashCode()Returns the hash code for this instance.
public override string ToString()Returns the fully qualified type name of this instance.
Used by (40)
- ClusterGrainsVixen.Live.Realm.Cluster
- ClusterSerializationTestsVixen.Live.Cluster.Tests
- FakeClusterVixen.Live.Realm.Cluster.Tests
- FakeShardVixen.Live.Realm.Cluster.Tests
- FleetGrainVixen.Live.Orchestrator
- FleetSimulationVixen.Live.Orchestrator.Tests
- GateServiceVixen.Live.Gate
- GateServiceTestsVixen.Live.Gate.Tests
- IRealmGrainsVixen.Live.Realm.Cluster
- IShardGrainVixen.Live.Cluster
- KeysVixen.Live.Cluster
- LiveVocabularyTestsVixen.Live.Abstractions.Tests
- MapAndHeartbeatTestsVixen.Live.Realm.Tests
- MapCoordinatorVixen.Live.Orchestrator
- MapCoordinatorTestsVixen.Live.Orchestrator.Tests
- MapFleetVixen.Live.Orchestrator
- MapFleetTestsVixen.Live.Orchestrator.Tests
- MapGrainVixen.Live.Orchestrator
- MapLifetimeVixen.Live.Realm
- OrchestratorLogVixen.Live.Orchestrator
- PlaceRequestVixen.Live.Cluster
- PlacementDirectorVixen.Live.Orchestrator
- PlacementDirectorTestsVixen.Live.Orchestrator.Tests
- PlacementRequestVixen.Live.Orchestrator
- RealmVixen.Live.Realm
- RealmVixen.Live.Realm.Tests
- RealmClusterTestsVixen.Live.Realm.Cluster.Tests
- RealmFixtureVixen.Live.Realm.Tests
- RealmHostVixen.Live.Realm
- RealmSpecVixen.Live.Abstractions
- RealmSpecTestsVixen.Live.Abstractions.Tests
- RolloutVixen.Live.Orchestrator
- RolloutTestsVixen.Live.Orchestrator.Tests
- ShardCandidateVixen.Live.Orchestrator
- ShardGrainVixen.Live.Orchestrator
- ShardKeyConverterVixen.Live.Cluster
- ShardLifecycleVixen.Live.Orchestrator
- ShardLifecycleTestsVixen.Live.Orchestrator.Tests
- ShardReportVixen.Live.Cluster
- TransferFleetVixen.Live.Realm.Tests