Skip to content

Repository files navigation

Multiplayer Samples

This Repo contains samples that demonstrates how to enable Local Multiplayer in Mixed Reailty using Unity

If you are using Meta XR Core SDK v65+ and (Netcode for GameObjects or Photon Fusion 2) the majority of this code has been ported over to Multiplayer Building Blocks which provides a simpler version of this repo that demonstrates how to enable Mixed Reality Local Multiplayer

Sample Description

The sample contains 3 different Unity Projects. Where each project contains one of the following Networking Layers

  • Netcode for GameObjects
  • Photon Fusion 1
  • Photon Unity Networking 2

In each Unity Project, the Multiplayer Sample contains the following

  • Matchmaking - Finding Players to play with
  • Player Connection - Players joining the same game to play in
  • Colocation - Players can see the same object in the same position

Repo Breakdown

colocation-package - Contains network agnostic interfaces that can be used to implement colocation

colocation-sample-fusion - Contains a Local Multiplayer Sample using Photon Fusion 1 as the networking layer

colocation-sample-ngo - Contains a Local Multiplayer Sample using Netcode for GameObjcts as the networking layer

colocation-sample-pun2 - Contains a Local Multiplayer Sample using Photon Unity Networking 2 as the networking layer

License

This codebase is available as both a sample and a template for mixed reality projects. The majority of the project is licensed under MIT LICENSE, however files from Text Mesh Pro, and Photon SDK[1] [2], are licensed under their respective licensing terms.

See the CONTRIBUTING file for how to help out.

AI coding agents

This repo is wired up for AI coding agents — AGENTS.md, .vscode/extensions.json, .mcp.json, .cursor/rules/, and a few client-specific dotfiles surface the Meta Horizon VS Code/Cursor extension, the hzdb MCP server, and the Meta Quest skill set automatically.

Full toolchain (including Unity skills and per-client install instructions): https://github.com/meta-quest/agentic-tools

About

Mixed Reality samples that demonstrate how to enable multiplayer

Resources

Code of conduct

Contributing

Stars

52 stars

Watchers

13 watching

Forks

Releases

Packages

Used by

Contributors

Languages