Realms

A realm is a persistent world instance represented by metadata saved in the cloud, which you can serve on-demand when players want to access it. The Realms service combines technologies that enable players to create, discover, manage, and host worlds.

A practical example of using a realm is a sandbox game that enables multiple players to play together in the same world and change the environment or build structures. The realm for this game is the collection of world data necessary to save and reload the unique state of the world, along with relevant metadata (such as unique ID and name).

For users to interact in a realm, you must implement the following:

  • A way to save world data to the cloud and retrieve it for later use.
  • A way for players to discover and join worlds.
  • A way for players and developers to manage worlds.
  • A way to host a game for a specific realm.

The Unity Realms service solves these problems by offering:

  • A cloud database optimized for real-time saving and loading by game servers in the form of roaming databases.
  • A lobby session service to enable world discovery and management.
  • Unity Cloud Dashboard integrations for management of worlds.
  • On-demand dedicated server hosting of worlds.

Note: You can use many of these pieces individually outside of the Realms service (Lobby, Multiplay Hosting, and Roaming Databases), but the service combines them to streamline the hosting of persistent experiences.

Realm lifecycle

The lifecycle of a realm extends beyond the lifetime of the transient components that power it (such as the game server and the lobby). Game servers can share a realm over an extended period (if each game server takes turns running the realm simulation). However, two game servers can’t access a realm simultaneously.

For example, suppose you use the Realms service with a lobby to coordinate players engaged in the simulation. In that case, the lobby is transient and dismissed when the game server shuts down (and no players are connected) while the realm continues to exist, ensuring persistence.