Class NetKeys

Namespace
Unity.Multiplayer.Core

The rules for a networked object's key (UM-T60): the stable name a game gives an object on the server (a level's block id, a door's name, "chest:3") that every peer looks the object up by, instead of guessing it from spawn order or a network object id. The adapter's NetKey carries it and NetRegistry indexes it.

public static class NetKeys
Inheritance
NetKeys
Inherited Members

Remarks

Keys are compared ordinally (case matters) and are unique among the objects spawned at any one time.

Fields

MaxLength

The longest key, in characters.

public const int MaxLength = 128

Field Value

int

Methods

Describe(string)

key quoted for a message (null shown as such).

public static string Describe(string key)

Parameters

key string

Returns

string

DuplicateMessage(string, string, string)

The error for a second object spawned with a key a live object already has.

public static string DuplicateMessage(string key, string holder, string newcomer)

Parameters

key string

The key both claim.

holder string

The object that has it (for the message).

newcomer string

The object that was refused (for the message).

Returns

string

IsValid(string)

True when key can be a key (Validate(string) finds nothing wrong).

public static bool IsValid(string key)

Parameters

key string

Returns

bool

NotFoundMessage(string)

The error for a lookup of a key no spawned object has.

public static string NotFoundMessage(string key)

Parameters

key string

Returns

string

Validate(string)

Why key cannot be a key, or null when it can.

public static string Validate(string key)

Parameters

key string

Returns

string