PRODUCT

Connect your players with Relay

Provide great multiplayer gaming experiences with Unity’s Relay service.

Enable great multiplayer experiences with Relay

The Relay service allows you to connect your players and provide great multiplayer gaming experiences without the need for a costly dedicated game server. Our service enables easy and secure peer-to-peer, listen-server UDP communications between players.

Save on hosting with simple pricing

Relay offers a free tier that covers your pre-development needs and pricing based on average concurrent users (CCU) and egress consumptions – so you only pay as your game grows. 

Our pricing model is designed to protect you from otherwise expensive peaks in your CCU by only charging based on the average number of users and egress your game has in a given month.

Person pointing to a computer screen with a pencil

Woman excited in front of computer screen

Level up with other services

Relay plays well with other multiplayer services – like Unity Lobby, Netcode for GameObjects, and Mirror.

Provide better multiplayer gaming experiences with Lobby by sending service-to-service notifications when a player disconnects from the game and automatically removes zombie players.

Plus, access a reliable foundation for your multiplayer game with Netcode for GameObjects or Mirror – both integrable with Relay.

Cristian David Chorolqui, CEO & Founder, Conejiara Studios

“Relay and Lobby work very well together, and they helped our team implement the online features and functions we were looking for in our game. The Unity staff was always willing to help us and will definitely continue to use the service!”

Cristian David Chorolqui, CEO & Founder, Conejiara Studios

Key benefits

A cost-friendly solution to connect your players

The peer-to-peer client server model hosts games on your player’s devices at home, saving you the cost of renting or maintaining dedicated servers.

Simple and automatic scaling

Let Relay do the heavy lifting of automatic scaling for users, scaling to meet your capacity requirements in a multi-tenant fashion.

Secure communications with DTLS

Relay supports DTLS (Datagram Transport Layer Security) encryption of all UDP communication to and from the Relay servers, this enables your users to deliver data that is securely encrypted and authenticated.

Frequently asked questions

What are the main components of Relay?

Relay includes 2 main components: 

  1. The Relay Server that is attached to the low-level Unity Transport layer to send bytes across clients. 
  2. The Relay Allocation service that works on the backend to enable players to create and join matches via sharing access code.
Are there any costs associated with Relay?

Relay offers a generous free tier that covers projects up to the first 50 CCU. After that, pricing is based on average CCU. See the UGS pricing page for more details.

What is the process to activate Relay?

The self-serve Relay onboarding process on Unity Dashboard is available to all users. Simply click “Get Started” on the Relay page.

Will there be any samples available to showcase what Relay offers?

We have a Game Lobby sample that demonstrates how to use the Lobby and Relay packages to create a typical game lobby experience. This sample leverages Relay, Lobby, Unity Transport, and Vivox Voice chat.

Additionally, our Boss Room sample leverages Relay, Lobby, and Netcode for GameObjects in a small scale cooperative RPG.

Do users need to use Relay with our Lobby service? If not, what is the benefit of using Relay and Lobby together?

Relay and Lobby can be used separately. However, we do recommend using them together because: 

  • Combined, they improve the player experience by providing automatic disconnect notifications when a player leaves the lobby.
  • Relay sends notifications to Lobby when a player disconnects from the game, so the Lobby can remove the disconnected player.

We use cookies to ensure that we give you the best experience on our website. Visit our cookie policy page for more information.

Got it