From df2330239f86d4d47fce2db44402681093def0fd Mon Sep 17 00:00:00 2001 From: vis2k Date: Sat, 13 Mar 2021 19:49:45 +0800 Subject: [PATCH] add TODO --- Assets/Mirror/Runtime/NetworkConnection.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assets/Mirror/Runtime/NetworkConnection.cs b/Assets/Mirror/Runtime/NetworkConnection.cs index 45ff0f56c..eb309d977 100644 --- a/Assets/Mirror/Runtime/NetworkConnection.cs +++ b/Assets/Mirror/Runtime/NetworkConnection.cs @@ -10,6 +10,7 @@ public abstract class NetworkConnection public const int LocalConnectionId = 0; // NetworkIdentities that this connection can see + // TODO move to server's NetworkConnectionToClient? internal readonly HashSet observing = new HashSet(); // TODO this is NetworkServer.handlers on server and NetworkClient.handlers on client. @@ -113,6 +114,7 @@ protected static bool ValidatePacketSize(ArraySegment segment, int channel public override string ToString() => $"connection({connectionId})"; + // TODO move to server's NetworkConnectionToClient? internal void AddToObserving(NetworkIdentity netIdentity) { observing.Add(netIdentity); @@ -121,6 +123,7 @@ internal void AddToObserving(NetworkIdentity netIdentity) NetworkServer.ShowForConnection(netIdentity, this); } + // TODO move to server's NetworkConnectionToClient? internal void RemoveFromObserving(NetworkIdentity netIdentity, bool isDestroyed) { observing.Remove(netIdentity); @@ -132,6 +135,7 @@ internal void RemoveFromObserving(NetworkIdentity netIdentity, bool isDestroyed) } } + // TODO move to server's NetworkConnectionToClient? internal void RemoveObservers() { foreach (NetworkIdentity netIdentity in observing)