mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Syntax
This commit is contained in:
parent
198fed4bdf
commit
73c47b5fc3
@ -23,6 +23,7 @@ public enum CheckMethod
|
|||||||
XZ_FOR_3D,
|
XZ_FOR_3D,
|
||||||
XY_FOR_2D
|
XY_FOR_2D
|
||||||
}
|
}
|
||||||
|
|
||||||
[Tooltip("Spatial Hashing supports 3D (XZ) and 2D (XY) games.")]
|
[Tooltip("Spatial Hashing supports 3D (XZ) and 2D (XY) games.")]
|
||||||
public CheckMethod checkMethod = CheckMethod.XZ_FOR_3D;
|
public CheckMethod checkMethod = CheckMethod.XZ_FOR_3D;
|
||||||
|
|
||||||
|
@ -12,16 +12,14 @@ public abstract class InterestManagement : MonoBehaviour
|
|||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
if (NetworkServer.aoi == null)
|
if (NetworkServer.aoi == null)
|
||||||
{
|
|
||||||
NetworkServer.aoi = this;
|
NetworkServer.aoi = this;
|
||||||
}
|
else
|
||||||
else Debug.LogError($"Only one InterestManagement component allowed. {NetworkServer.aoi.GetType()} has been set up already.");
|
Debug.LogError($"Only one InterestManagement component allowed. {NetworkServer.aoi.GetType()} has been set up already.");
|
||||||
|
|
||||||
if (NetworkClient.aoi == null)
|
if (NetworkClient.aoi == null)
|
||||||
{
|
|
||||||
NetworkClient.aoi = this;
|
NetworkClient.aoi = this;
|
||||||
}
|
else
|
||||||
else Debug.LogError($"Only one InterestManagement component allowed. {NetworkClient.aoi.GetType()} has been set up already.");
|
Debug.LogError($"Only one InterestManagement component allowed. {NetworkClient.aoi.GetType()} has been set up already.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Callback used by the visibility system to determine if an observer
|
// Callback used by the visibility system to determine if an observer
|
||||||
@ -59,9 +57,7 @@ void Awake()
|
|||||||
protected void RebuildAll()
|
protected void RebuildAll()
|
||||||
{
|
{
|
||||||
foreach (NetworkIdentity identity in NetworkServer.spawned.Values)
|
foreach (NetworkIdentity identity in NetworkServer.spawned.Values)
|
||||||
{
|
|
||||||
NetworkServer.RebuildObservers(identity, false);
|
NetworkServer.RebuildObservers(identity, false);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Callback used by the visibility system for objects on a host.
|
// Callback used by the visibility system for objects on a host.
|
||||||
|
Loading…
Reference in New Issue
Block a user