Warning
This sample is deprecated. This sample was tested on Unity 2020.3 and is not maintained for later versions.
The Unity Relay Mirror Sample demonstrates how to use the Unity Transport Package, the Unity Relay service, and the Mirror Networking library together.
- The Unity Transport Package is a low-level networking library that provides a connection-based abstraction layer over UDP sockets with optional functionality such as reliability, ordering, and fragmentation.
- Relay is a Unity service that facilitates securely connecting players by using a join code style workflow without the need for dedicated game servers or peer-to-peer communication.
- The Mirror Networking library is a high-level networking library for the Unity Platform.
The Unity Relay documentation contains additional information on the usage of this sample.
The sample has the following requirements:
- Unity Editor version 2020.3.40f1
- Unity services
- Unity packages
- Mirror Networking library
If you would like to use the code from this sample in your own project, please perform the following steps:
- Install the latest version of Mirror.
- The latest version of Mirror can be obtained from either the Unity Asset Store or the Mirror repository on Github.
- Install the latest version of the
com.unity.jobs
package using the Unity Package Manager. - Install the latest version of the
com.unity.services.relay
package using the Unity Package Manager. - Copy the
Assets/UTPTransport
folder from this sample into theAssets/
directory of your own project.
The Unity Relay Mirror Sample is an open-source project and we encourage and welcome contributions. If you wish to contribute, be sure to review our contribution guidelines.