Class ServerPaths

Namespace
Unity.Multiplayer.Core

The folders a running server package uses.

public sealed class ServerPaths
Inheritance
ServerPaths
Inherited Members

Constructors

ServerPaths(string, ServerSettings)

Resolves settings' folders against packageDirectory.

public ServerPaths(string packageDirectory, ServerSettings settings)

Parameters

packageDirectory string
settings ServerSettings

Exceptions

ArgumentNullException

An argument is null.

Properties

LogsDirectory

The logs folder, full path.

public string LogsDirectory { get; }

Property Value

string

PackageDirectory

The package folder, full path.

public string PackageDirectory { get; }

Property Value

string

SavesDirectory

The saves folder, full path: where a game keeps everything that must survive a restart or an update.

public string SavesDirectory { get; }

Property Value

string

Methods

EnsureCreated()

Creates the logs and saves folders when they are missing.

public void EnsureCreated()

SavePath(string)

A path under SavesDirectory; refuses a relative path that climbs out of it.

public string SavePath(string relativePath)

Parameters

relativePath string

Returns

string

Exceptions

ArgumentException

relativePath is empty, rooted or leaves the saves folder.