Interface IHostingProfile

Namespace
Unity.Multiplayer.Core

A kind of host a server package is built for. Every profile gets the same provider-neutral package (ServerPackageSpec); a profile only adjusts its defaults (a host that passes TCP only needs WebSocket) and adds its own files (a Dockerfile, a compose file, setup notes). A new host is a new profile: games never change.

public interface IHostingProfile

Remarks

Built in: GenericVpsProfile (the default), RunPodProfile and GameLiftProfile. G-Portal (its Private Server program for studios), Nitrado and Edgegap/Gameye (which allocate per match instead of keeping a server running -- see IMatchAllocator) are possible later additions, registered with Register(IHostingProfile).

Properties

Description

One sentence: what host this suits.

string Description { get; }

Property Value

string

DisplayName

A name for people (Generic VPS (Docker)).

string DisplayName { get; }

Property Value

string

Id

A short, file-safe identifier (GenericVps), used in menus, the manifest and folder names.

string Id { get; }

Property Value

string

Methods

Configure(ServerPackageSpec)

Adjusts the package's settings for this host before anything is written, such as forcing WebSocket. Called once by For(IHostingProfile, string, NetConfig, ServerSettings).

void Configure(ServerPackageSpec spec)

Parameters

spec ServerPackageSpec

CreateFiles(ServerPackageSpec)

The profile's own files, added to the package after the common ones. None may share a path with them.

IReadOnlyList<ServerPackageFile> CreateFiles(ServerPackageSpec spec)

Parameters

spec ServerPackageSpec

Returns

IReadOnlyList<ServerPackageFile>