Class NetworkVisibility
NetworkBehaviour that calculates if the gameObject should be visible to different players or not
Inherited Members
Show
Mirage.NetworkBehaviour._nextSyncTime
Mirage.NetworkBehaviour.SyncSettings
Mirage.NetworkBehaviour.IsServer
Mirage.NetworkBehaviour.IsClient
Mirage.NetworkBehaviour.IsLocalClient
Mirage.NetworkBehaviour.IsHost
Mirage.NetworkBehaviour.IsLocalPlayer
Mirage.NetworkBehaviour.IsServerOnly
Mirage.NetworkBehaviour.IsClientOnly
Mirage.NetworkBehaviour.HasAuthority
Mirage.NetworkBehaviour.NetId
Mirage.NetworkBehaviour.Server
Mirage.NetworkBehaviour.ServerObjectManager
Mirage.NetworkBehaviour.Client
Mirage.NetworkBehaviour.ClientObjectManager
Mirage.NetworkBehaviour.Owner
Mirage.NetworkBehaviour.World
Mirage.NetworkBehaviour.NetworkTime
Mirage.NetworkBehaviour.BehaviourId
Mirage.NetworkBehaviour.SyncVarDirtyBits
Mirage.NetworkBehaviour.AnySyncObjectDirty
Mirage.NetworkBehaviour.syncObjects
Mirage.NetworkBehaviour.Identity
Mirage.NetworkBehaviour.COMPONENT_INDEX_NOT_FOUND
Mirage.NetworkBehaviour.ComponentIndex
Mirage.NetworkBehaviour.InitSyncObject(Mirage.Collections.ISyncObject)
Mirage.NetworkBehaviour.UpdateSyncObjectShouldSync()
Mirage.NetworkBehaviour.SyncVarEqual<T>(T, T)
Mirage.NetworkBehaviour.ClearDirtyBits()
Mirage.NetworkBehaviour.AnyDirtyBits()
Mirage.NetworkBehaviour.SerializeObjectsAll(Mirage.Serialization.NetworkWriter)
Mirage.NetworkBehaviour.SerializeObjectsDelta(Mirage.Serialization.NetworkWriter)
Mirage.NetworkBehaviour.GetRpcCount()
Mirage.NetworkBehaviour.RegisterRpc(Mirage.RemoteCalls.RemoteCallCollection)
Syntax
public abstract class NetworkVisibility : NetworkBehaviour, INetworkVisibility
Methods
OnCheckObserver(INetworkPlayer)
Callback used by the visibility system to determine if an observer (player) can see this object. If this function returns true, the network connection will be added as an observer.
Declaration
public abstract bool OnCheckObserver(INetworkPlayer player)
Parameters
Type | Name | Description |
---|---|---|
Mirage.INetworkPlayer | player | Network connection of a player. |
Returns
Type | Description |
---|---|
System.Boolean | True if the player can see this object. |
OnRebuildObservers(HashSet<INetworkPlayer>, Boolean)
Callback used by the visibility system to (re)construct the set of observers that can see this object. Implementations of this callback should add network connections of players that can see this object to the observers set.
NOTE: override this function if you want to optimize this loop in your visibility, for example if you need to call GetComponent on this object you can call it once at the start of the loop
Declaration
public virtual void OnRebuildObservers(HashSet<INetworkPlayer> observers, bool initialize)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.HashSet<Mirage.INetworkPlayer> | observers | The new set of observers for this object. |
System.Boolean | initialize | True if the set of observers is being built for the first time. |