You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/GameyeAllocator/CONFIGURATION.md
+83-7Lines changed: 83 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,19 +14,95 @@ Add the following secret in the Unity Dashboard under **Administration > Secrets
14
14
15
15
## Code Configuration
16
16
17
-
Update the following constants in `Project/GameyeAllocator.cs`:
17
+
All configuration is set in `ModuleConfig.Setup()` in `Project/GameyeAllocator.cs`, where a `GameyeAllocatorConfig` instance is registered with dependency injection. Open that file and edit the values in the config block.
18
18
19
-
### `ImageName` (line 25)
19
+
### `Environment`
20
20
21
-
Set this to the name of your application image as configured in the Gameye Admin Panel. This must match the image name you registered during setup.
21
+
Controls which Gameye API endpoint the allocator targets.
Use `Sandbox` during development and testing. Switch to `Production` before going live.
29
+
30
+
> ⚠️ **`Environment` defaults to `Sandbox`.** If you go live without setting `Environment = GameyeEnvironment.Production`, every allocation silently targets sandbox infrastructure. As a safeguard, the allocator logs a **warning on every allocation while running in Sandbox** (and an info line confirming `PRODUCTION` once switched) — watch your Cloud Code logs to confirm the environment before launch.
31
+
32
+
### `ImageName` (required)
33
+
34
+
The name of your application image as configured in the Gameye Admin Panel. Must match exactly.
35
+
36
+
### `DefaultLocation`
37
+
38
+
Your preferred default deployment region (e.g. `"europe"`, `"us-east-1"`). Used when the matched pool has no entry in `LocationByPool`. See [available locations](https://www.gameye.com/docs/api-v2/available-locations/) for the full list. Defaults to `"europe"`.
39
+
40
+
### `LocationByPool` (optional)
41
+
42
+
Maps Unity Matchmaker **pool names** to Gameye location IDs, enabling dynamic region selection per match. When the matched pool is found in this dictionary, that location is sent to Gameye instead of `DefaultLocation`. Pools not in the map fall through to `DefaultLocation`.
43
+
44
+
Unity Matchmaker can be configured to use pools for region routing — create one pool per region in your queue configuration, then mirror that mapping here.
45
+
46
+
```csharp
47
+
LocationByPool=newDictionary<string, string>
48
+
{
49
+
{ "eu-west-pool", "eu-west" },
50
+
{ "us-central-pool", "us-central" },
51
+
{ "ap-ne-pool", "asia-northeast" },
52
+
{ "sa-east-pool", "southamerica" },
53
+
},
54
+
```
55
+
56
+
Leave empty (the default) to always use `DefaultLocation`.
57
+
58
+
### `GamePort`
59
+
60
+
The primary container port your game server listens on (e.g. `7777`). This must match the port exposed in your Dockerfile and configured in the Gameye Admin Panel. This is the port passed to Unity Matchmaker's `AssignmentData.IpPort()`.
61
+
62
+
### `AdditionalPorts` (optional)
63
+
64
+
A dictionary of additional named ports to include in allocation data. Use this when your game server exposes secondary ports (e.g. a query port, voice port, or RCON port).
65
+
66
+
Each entry is returned in `AllocationData` as `port_{name}` so game clients can access them.
67
+
68
+
```csharp
69
+
AdditionalPorts=newDictionary<string, int>
70
+
{
71
+
{ "query", 27015 },
72
+
{ "rcon", 27020 },
73
+
},
74
+
```
75
+
76
+
### `Version` (optional)
77
+
78
+
A specific Docker image tag / version to use when starting sessions. When `null` (the default), Gameye uses the highest-priority tag configured in the Admin Panel.
24
79
25
-
Set this to your preferred default deployment region (e.g. `"europe"`, `"north-america"`). See [available locations](https://www.gameye.com/docs/api-v2/available-locations/) for the full list.
80
+
```csharp
81
+
Version="v1.2.3",
82
+
```
26
83
27
-
### `GamePort` (line 27)
84
+
##Example Configuration
28
85
29
-
Set this to the container port your game server listens on (e.g. `7777`). This must match the port exposed in your Dockerfile and configured in the Gameye Admin Panel.
logger.LogWarning("GameyeAllocator is running in SANDBOX ({ApiBaseUrl}) — sandbox infrastructure is not intended for production traffic. Set Environment = GameyeEnvironment.Production in ModuleConfig.Setup() before going live.",allocatorConfig.ApiBaseUrl);
100
+
}
101
+
else
102
+
{
103
+
logger.LogInformation("GameyeAllocator is running in PRODUCTION ({ApiBaseUrl}).",allocatorConfig.ApiBaseUrl);
0 commit comments