3using System.Collections.Generic;
8 [DisallowMultipleComponent]
9 [HelpURL(
"https://mirror-networking.gitbook.io/docs/guides/interest-management")]
19 NetworkServer.aoi =
this;
21 else Debug.LogError($
"Only one InterestManagement component allowed. {NetworkServer.aoi.GetType()} has been set up already.");
25 NetworkClient.aoi =
this;
27 else Debug.LogError($
"Only one InterestManagement component allowed. {NetworkClient.aoi.GetType()} has been set up already.");
31 public virtual void Reset() {}
57 public abstract void OnRebuildObservers(
NetworkIdentity identity, HashSet<NetworkConnectionToClient> newObservers);
66 protected void RebuildAll()
83 public virtual void SetHostVisibility(
NetworkIdentity identity,
bool visible)
85 foreach (Renderer rend
in identity.GetComponentsInChildren<Renderer>())
86 rend.enabled = visible;
virtual void OnDestroyed(NetworkIdentity identity)
Called on the server when a networked object is destroyed.
virtual void OnSpawned(NetworkIdentity identity)
Called on the server when a new networked object is spawned.
NetworkClient with connection to server.
NetworkIdentity identifies objects across the network.
NetworkServer handles remote connections and has a local connection for a local client.
static readonly Dictionary< uint, NetworkIdentity > spawned
All spawned NetworkIdentities by netId.