Table of Contents

Class GameMasterInvisibility

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Server-side set of characters hidden by /gm invis. A hidden character is not observed by any connection except its own and staff (game masters and above), so it is despawned on every other client: no model, nameplate, sound or broadcast reaches them.

public static class GameMasterInvisibility
Inheritance
GameMasterInvisibility
Inherited Members

Remarks

Enforced by ObserverBudgetCondition, one of the scene server's default observer conditions, so it covers every character without a per-prefab condition. Staff keep seeing a hidden colleague so two game masters working the same scene do not lose each other.

Keyed by the object, and cleared when the character despawns (the caller's job): characters are pooled, and a pooled object reused by another player must not arrive hidden. Not persisted: a game master who relogs is visible again.

Properties

IsEmpty

True when no character is hidden: the observer condition's fast path.

public static bool IsEmpty { get; }

Property Value

bool

Methods

Clear()

Forgets every hidden character (server stop).

public static void Clear()

HidesFrom(NetworkObject, NetworkConnection)

Whether nob must be withheld from viewer: it is hidden, and the viewer is neither its owner nor staff.

public static bool HidesFrom(NetworkObject nob, NetworkConnection viewer)

Parameters

nob NetworkObject
viewer NetworkConnection

Returns

bool

IsHidden(NetworkObject)

Whether nob is hidden.

public static bool IsHidden(NetworkObject nob)

Parameters

nob NetworkObject

Returns

bool

SetHidden(NetworkObject, bool)

Hides or shows a character. Returns true when that changed anything.

public static bool SetHidden(NetworkObject nob, bool value)

Parameters

nob NetworkObject
value bool

Returns

bool