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
packageDirectorystringsettingsServerSettings
Exceptions
- ArgumentNullException
An argument is null.
Properties
LogsDirectory
The logs folder, full path.
public string LogsDirectory { get; }
Property Value
PackageDirectory
The package folder, full path.
public string PackageDirectory { get; }
Property Value
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
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
relativePathstring
Returns
Exceptions
- ArgumentException
relativePathis empty, rooted or leaves the saves folder.