What runtime values are available from IExecutionContext?
IExecutionContext context is passed to both Allocate and Poll and gives you:
context.ProjectId— Unity project ID. Required when constructing URLs for Unity REST APIs that include the project ID in their path.context.EnvironmentId— active environment (production,development, etc.). Use this to route to different provider fleets or queues without hardcoding per-environment config.context.ServiceToken— short-lived bearer token for authenticating calls to Unity's REST APIs. Pass asAuthorization: Bearer {token}when calling Unity services directly.
What match-level values are available directly on MatchmakingResults?
These are top-level properties on MatchmakingResults, not entries inside MatchProperties:
MatchId— unique ID for this match. Use it as a session or placement ID with your provider for idempotency.PoolId/PoolName— which pool triggered this allocation. Useful for routing to different fleets per pool.QueueName— the queue the ticket was submitted to.EnvironmentId— environment the match was created in. Matchescontext.EnvironmentIdand is useful when the payload is forwarded to the game server.BackfillTicketId— set on backfill allocations, null otherwise.
Player list, region, max players, and other match-shape data live on MatchmakingResults.MatchProperties (see the previous question).
var env = context.EnvironmentId;
var regionValue = request.MatchmakingResults.MatchProperties.GetValueOrDefault("Region")?.ToString();
var region = string.IsNullOrEmpty(regionValue) ? DefaultRegion : regionValue;
// MatchId doubles as a stable placement ID — useful for idempotent provider calls
var placementId = request.MatchmakingResults.MatchId;
logger.LogInformation("env={Env} pool={Pool} region={Region} match={MatchId}",
env, request.MatchmakingResults.PoolName, region, placementId);