Skip to content

docs: add Unity and Photon Fusion game engine integration guides - #333

Merged
Hauke Löffler (hloeffler) merged 8 commits into
mainfrom
docs/unity-agones-integration
Aug 5, 2026
Merged

docs: add Unity and Photon Fusion game engine integration guides#333
Hauke Löffler (hloeffler) merged 8 commits into
mainfrom
docs/unity-agones-integration

Conversation

@hloeffler

@hloeffler Hauke Löffler (hloeffler) commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

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:

  • Installing the Agones SDK via Unity Package Manager (version-pinned)
  • Implementing the Agones lifecycle (Ready, Allocate, Shutdown) in C#
  • Building a headless Linux Dedicated Server
  • Creating a container image with the correct uid (1000)

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 guide
  • src/multiplayer-servers/game-engine-examples/photon-fusion.md — Photon Fusion + Agones integration guide, building on the Unity guide (session management, Photon Cloud connectivity)

Copilot AI lite review requested due to automatic review settings July 28, 2026 12:55
@hloeffler
Hauke Löffler (hloeffler) requested a review from a team as a code owner July 28, 2026 12:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/multiplayer-servers/game-engine-examples/sidebar.json
Comment thread src/multiplayer-servers/game-engine-examples/unity.md
Comment thread src/multiplayer-servers/game-engine-examples/unity.md
Comment thread src/multiplayer-servers/game-engine-examples/unity.md Outdated
Comment thread src/multiplayer-servers/game-engine-examples/unity.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 28, 2026 13:00
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: 4 duplicates the existing Architecture section's order within src/multiplayer-servers/*/sidebar.json, which triggers the duplicate-order warning in .vitepress/config.js and 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.json snippet isn’t valid JSON because of the ... placeholder. Since readers may copy/paste this into Packages/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 Agones 1.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.
  1. Shutdown — when the last player leaves
</details>

Copilot AI review requested due to automatic review settings July 28, 2026 13:07
@hloeffler
Hauke Löffler (hloeffler) force-pushed the docs/unity-agones-integration branch from 662304d to 08c730a Compare July 28, 2026 13:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json snippet includes ..., which is not valid JSON. Readers may copy/paste this into Packages/manifest.json and Unity will fail to parse it. Consider showing a minimal valid dependencies object instead (or switch the code fence to jsonc and use a comment).
```json
{
  "dependencies": {
    "com.googleforgames.agones": "https://github.com/agones-dev/agones.git?path=/sdks/unity#v1.59.0",
    ...

Copilot AI review requested due to automatic review settings July 28, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 into Packages/manifest.json and 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",
    ...
  }

Comment thread src/multiplayer-servers/game-engine-examples/sidebar.json
Comment thread src/multiplayer-servers/game-engine-examples/unity.md Outdated
Comment thread src/multiplayer-servers/game-engine-examples/unity.md Outdated
Comment thread src/multiplayer-servers/game-engine-examples/unity.md Outdated
* docs: add Photon Fusion integration guide
Copilot AI review requested due to automatic review settings July 29, 2026 13:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 json fenced block is not valid JSON because it uses ... and includes a trailing comma. Since readers are likely to copy/paste this into Packages/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 if statement 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 if statement 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)
Copilot AI review requested due to automatic review settings July 29, 2026 13:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json example is not valid JSON because it contains .... Readers who copy/paste it into Packages/manifest.json will 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.
Copilot AI review requested due to automatic review settings August 5, 2026 10:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json example 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() returns Task<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() returns Task<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() returns Task<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() returns Task<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"
    }

@hloeffler Hauke Löffler (hloeffler) changed the title docs: add Unity + Agones game engine integration guide docs: add Unity and Photon Fusion game engine integration guides Aug 5, 2026
@hloeffler
Hauke Löffler (hloeffler) merged commit 8299854 into main Aug 5, 2026
6 checks passed
@hloeffler
Hauke Löffler (hloeffler) deleted the docs/unity-agones-integration branch August 5, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants