Revert "Syntax"

This reverts commit 73c47b5fc3.
This commit is contained in:
vis2k 2021-09-07 11:22:42 +08:00
parent 32f0fa47ef
commit 3bd30d13e2
2 changed files with 8 additions and 5 deletions

View File

@ -23,7 +23,6 @@ public enum CheckMethod
XZ_FOR_3D,
XY_FOR_2D
}
[Tooltip("Spatial Hashing supports 3D (XZ) and 2D (XY) games.")]
public CheckMethod checkMethod = CheckMethod.XZ_FOR_3D;

View File

@ -12,14 +12,16 @@ public abstract class InterestManagement : MonoBehaviour
void Awake()
{
if (NetworkServer.aoi == null)
{
NetworkServer.aoi = this;
else
Debug.LogError($"Only one InterestManagement component allowed. {NetworkServer.aoi.GetType()} has been set up already.");
}
else Debug.LogError($"Only one InterestManagement component allowed. {NetworkServer.aoi.GetType()} has been set up already.");
if (NetworkClient.aoi == null)
{
NetworkClient.aoi = this;
else
Debug.LogError($"Only one InterestManagement component allowed. {NetworkClient.aoi.GetType()} has been set up already.");
}
else 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
@ -57,7 +59,9 @@ void Awake()
protected void RebuildAll()
{
foreach (NetworkIdentity identity in NetworkServer.spawned.Values)
{
NetworkServer.RebuildObservers(identity, false);
}
}
// Callback used by the visibility system for objects on a host.