docs: add Unity and Photon Fusion game engine integration guides - #333
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new “Game Engine Examples” documentation section under multiplayer-servers, with an initial Unity + Agones integration guide to help studios implement the Agones lifecycle, build headless dedicated servers, and containerize correctly for GameFabric.
Changes:
- Added a Unity + Agones integration guide (UPM install, lifecycle sample, dedicated server build, container image example).
- Added a new “Game Engine Examples” sidebar section entry for Unity.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/multiplayer-servers/game-engine-examples/unity.md | New Unity + Agones guide content (installation, lifecycle, build, containerization). |
| src/multiplayer-servers/game-engine-examples/sidebar.json | New sidebar section for “Game Engine Examples” and Unity page link. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (6)
src/multiplayer-servers/game-engine-examples/sidebar.json:4
order: 4duplicates the existingArchitecturesection'sorderwithinsrc/multiplayer-servers/*/sidebar.json, which triggers the duplicate-order warning in.vitepress/config.jsand can lead to unstable sidebar ordering. Use a unique order value for this new section.
"order": 6,
src/multiplayer-servers/game-engine-examples/unity.md:23
- The
manifest.jsonsnippet isn’t valid JSON because of the...placeholder. Since readers may copy/paste this intoPackages/manifest.json, the example should be valid JSON (you can keep it minimal and mention other dependencies are unchanged).
```json
{
"dependencies": {
"com.googleforgames.agones": "https://github.com/agones-dev/agones.git?path=/sdks/unity#v1.59.0",
...
src/multiplayer-servers/game-engine-examples/unity.md:121
- For consistency with other docs in this repo, prefer sentence case for headings.
- `UnityPlayer.so` — Unity runtime library
src/multiplayer-servers/game-engine-examples/unity.md:28
- This page recommends pinning the Unity SDK to
v1.59.0, but the existing Agones SDK guidance in this repo says GameFabric runs Agones1.58.0. To avoid encouraging an incompatible SDK version, either pin to a version compatible with the platform or explicitly call out the compatibility requirement and link to the Agones version note.
::: warning Version pinning
**src/multiplayer-servers/game-engine-examples/unity.md:39**
* For consistency with other docs in this section (which use sentence case headings, e.g. "Game server lifecycle"), this heading should be sentence case.
| Health() | — | Automatic heartbeat (runs in background) |
**src/multiplayer-servers/game-engine-examples/unity.md:108**
* For consistency with other docs in this repo, prefer sentence case for headings.
This issue also appears on line 121 of the same file.
- Shutdown — when the last player leaves
</details>
662304d to
08c730a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/multiplayer-servers/game-engine-examples/unity.md:23
- The
manifest.jsonsnippet includes..., which is not valid JSON. Readers may copy/paste this intoPackages/manifest.jsonand Unity will fail to parse it. Consider showing a minimal validdependenciesobject instead (or switch the code fence tojsoncand use a comment).
```json
{
"dependencies": {
"com.googleforgames.agones": "https://github.com/agones-dev/agones.git?path=/sdks/unity#v1.59.0",
...
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/multiplayer-servers/game-engine-examples/unity.md:24
- The JSON example includes
..., which is not valid JSON. Readers are likely to copy/paste this intoPackages/manifest.jsonand get a parse error. Prefer a minimal, valid JSON snippet (and omit other dependencies outside the code block).
"dependencies": {
"com.googleforgames.agones": "https://github.com/agones-dev/agones.git?path=/sdks/unity#v1.59.0",
...
}
* docs: add Photon Fusion integration guide
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
src/multiplayer-servers/game-engine-examples/unity.md:28
- The content of this
jsonfenced block is not valid JSON because it uses...and includes a trailing comma. Since readers are likely to copy/paste this intoPackages/manifest.json, make the example syntactically valid JSON (use a placeholder dependency key/value instead of...).
{
"dependencies": {
"com.googleforgames.agones": "https://github.com/agones-dev/agones.git?path=/sdks/unity#v1.59.0",
...
}
src/multiplayer-servers/game-engine-examples/photon-fusion.md:93
- This
ifstatement in the C# example omits braces while spanning multiple lines of explanatory comments. That pattern is easy to misread and easy to break when readers add another statement later; wrapping the body in braces makes the example safer to follow.
if (_playerCount == 1)
// Signal to GameFabric that this server is actively hosting a session.
// While allocated, the server is protected from being shut down
// for scaling or maintenance.
await _agones.Allocate();
src/multiplayer-servers/game-engine-examples/unity.md:89
- This
ifstatement in the C# example omits braces while spanning multiple lines of explanatory comments. That pattern is easy to misread and easy to break when readers add another statement later; wrapping the body in braces makes the example safer to follow.
if (_playerCount == 1)
// Signal to GameFabric that this server is actively hosting a session.
// While allocated, the server is protected from being shut down
// for scaling or maintenance.
await _agones.Allocate();
- Link MonoBehaviour to Unity ScriptReference docs - Remove ::: warning container around container user info, inline the text - Remove generic "Build and push" section (not adding value) - Bump base image from ubuntu:22.04 to ubuntu:24.04 (LTS) - Fix libssl3 → libssl3t64 (renamed in 24.04 due to time64 transition)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
src/multiplayer-servers/game-engine-examples/unity.md:30
- The
manifest.jsonexample is not valid JSON because it contains.... Readers who copy/paste it intoPackages/manifest.jsonwill get a parse error; use a minimal valid snippet and mention in prose that other dependencies can remain.
```json
{
"dependencies": {
"com.googleforgames.agones": "https://github.com/agones-dev/agones.git?path=/sdks/unity#v1.59.0",
...
}
}
**src/multiplayer-servers/game-engine-examples/unity.md:43**
* The table lists `Health()` as returning "—", but the Agones Unity SDK `Health()` method returns a `Task<bool>` (even if it is typically invoked automatically in the background). This mismatch can confuse readers about whether `Health()` is awaitable and reports success/failure.
| Health() | — | Automatic heartbeat (runs in background) |
**src/multiplayer-servers/game-engine-examples/photon-fusion.md:5**
* The intro claims Photon Fusion is for "Unity, Unreal, and Godot". Photon Fusion has official Unity and Unreal support, but there doesn't appear to be official Godot support; mentioning Godot here is likely misleading for readers.
Photon Fusion is a high-performance multiplayer netcode SDK for Unity, Unreal, and Godot. In Dedicated Server mode, a headless game instance acts as the authoritative server while clients connect via the Photon Cloud.
</details>
The linked GameFabric/examples repo doesn't exist yet, so drop the dangling "Full Example" section until a public example is available.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
Suppressed comments (8)
src/multiplayer-servers/game-engine-examples/unity.md:28
- The
manifest.jsonexample isn’t valid JSON (...placeholder + trailing comma). Since readers may copy/paste this, prefer a minimal valid JSON example and describe omitted dependencies in prose instead.
{
"dependencies": {
"com.googleforgames.agones": "https://github.com/agones-dev/agones.git?path=/sdks/unity#v1.59.0",
...
}
src/multiplayer-servers/game-engine-examples/unity.md:101
Shutdown()returnsTask<bool>, but the example ignores the result. Consider explicitly discarding it (or handling failure) so readers understand the call can fail.
await _agones.Shutdown();
src/multiplayer-servers/game-engine-examples/photon-fusion.md:104
Shutdown()returnsTask<bool>in the Agones Unity SDK, but this example ignores the result. Consider explicitly discarding it (or handling failure) so readers understand the call can fail.
await _agones.Shutdown();
src/multiplayer-servers/game-engine-examples/unity.md:114
- Headings here are in title case, but other Multiplayer Servers docs use sentence case (e.g.,
src/multiplayer-servers/getting-started/building-a-container-image.md). Please switch this (and other headings on this page) to sentence case for consistency.
## Unity Dedicated Server Build
src/multiplayer-servers/game-engine-examples/unity.md:89
Allocate()returnsTask<bool>(see table above), but the example ignores the result. Consider explicitly discarding it (or handling failure) so readers don’t assume the return value is irrelevant.
This issue also appears on line 101 of the same file.
await _agones.Allocate();
src/multiplayer-servers/game-engine-examples/photon-fusion.md:110
- This page uses title case for headings, but most Multiplayer Servers docs use sentence case (for example,
Building a container image,Game server lifecycle). Please switch headings to sentence case for consistency.
## Photon Cloud and Session Management
src/multiplayer-servers/game-engine-examples/photon-fusion.md:93
Allocate()returnsTask<bool>in the Agones Unity SDK, but this example ignores the result. Consider explicitly discarding it (or handling failure) so readers don’t assume the return value is meaningless.
This issue also appears on line 104 of the same file.
await _agones.Allocate();
src/multiplayer-servers/game-engine-examples/sidebar.json:13
- PR description says the Photon Fusion-specific guide will be added in a follow-up PR, but this PR already adds a Photon Fusion page and links it in the sidebar. Please either update the PR description to match the current scope, or move the Photon Fusion content to the follow-up PR.
{
"text": "Photon Fusion",
"link": "/game-engine-examples/photon-fusion"
}
What
Adds a new "Game Engine Examples" section to the docs with a Unity + Agones integration guide.
Why
Studios integrating Unity game servers with GameFabric need guidance on:
This page is engine-agnostic — it applies to any Unity networking SDK (Photon Fusion, Mirror, Netcode for GameObjects, FishNet, etc.).
What's new
src/multiplayer-servers/game-engine-examples/sidebar.json— new sidebar section "Game Engine Examples"src/multiplayer-servers/game-engine-examples/unity.md— Unity + Agones integration guidesrc/multiplayer-servers/game-engine-examples/photon-fusion.md— Photon Fusion + Agones integration guide, building on the Unity guide (session management, Photon Cloud connectivity)