Home

Awesome

THIS IS NO LONGER MAINTAINED. THE MLAPI.RELAY IS NOW OPEN SOURCE!

Introduction

The documentation and the relay itself is currently WIP. This is subject to change.

The MLAPI.Relay is a relay designed for the UNET Transport to relay traffic between peers that are hidden behind a NAT. Relaying traffic can be expensive but will allow communication between peers, regardless of the host's NAT configuration. The MLAPI.Relay works just like the NetworkTransport. Despite the naming, the MLAPI.Relay does not have to be used in conjunction with the MLAPI library, but rather with any game built on the NetworkTransport (including the HLAPI). The MLAPI.Relay includes default configurations for use with the MLAPI, HLAPI as well as an empty template for custom setups. To use the relay, simply replace "NetworkTransport" with "RelayTransport" where the following NetworkTransport methods are used:

Features

Matchmaking

Unlike Unity's relay, the MLAPI.Relay does not require you to use any specific matchmaker. The MLAPI.Relay will pass the destination address when connecting rather than a relay-specific roomId. This allows you to run the MLAPI.Relay with any matchmaker (or without a matchmaker all together).

Setup requirements

The MLAPI.Relay requires there be at least one reliable channel type (regardless of what subtype of reliable channel that is).

Configuration

The relay has a configuration file called config.json which consists of the three following parts:

connectionConfig

This is the NetworkTransport connectionConfig. These options have to match up with your game's connectionConfig.

globalConfig

This is the NetworkTransport GlobalConfig. This tells the NetworkTransport how it should work.

relayConfig

Relay config contains many different fields:

Trial license

The trial license has no limitations except that only 20 concurrent connections are allowed. This is to allow for endless evaluation and development.