Skip to main content

Interface IVisibilityTracker

An object that can observe NetworkIdentities. this is useful for interest management

Syntax
public interface IVisibilityTracker

Properties

VisList

HashSet of all that this player can see Only valid on server Reverse collection for

Declaration
IReadOnlyCollection<NetworkIdentity> VisList { get; }

Methods

AddToVisList(NetworkIdentity)

Called when sending spawn message to client

Declaration
void AddToVisList(NetworkIdentity identity)
Parameters
TypeNameDescription
Mirage.NetworkIdentityidentity

RemoveFromVisList(NetworkIdentity)

Called when sending destroy message to client

Declaration
void RemoveFromVisList(NetworkIdentity identity)
Parameters
TypeNameDescription
Mirage.NetworkIdentityidentity

RemoveAllVisibleObjects()

Removes all that this player can see This is called when loading a new scene

Declaration
void RemoveAllVisibleObjects()

ContainsInVisList(NetworkIdentity)

Checks if player can see

Declaration
bool ContainsInVisList(NetworkIdentity identity)
Parameters
TypeNameDescription
Mirage.NetworkIdentityidentity
Returns
TypeDescription
System.Boolean