From 9932b56b65ff927d1849ffcf5cc20a3a4cddeb25 Mon Sep 17 00:00:00 2001 From: vis2k Date: Mon, 8 Mar 2021 22:33:42 +0800 Subject: [PATCH] cleanup --- Assets/Mirror/Runtime/NetworkBehaviour.cs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/Assets/Mirror/Runtime/NetworkBehaviour.cs b/Assets/Mirror/Runtime/NetworkBehaviour.cs index 3646f56e3..252a4364d 100644 --- a/Assets/Mirror/Runtime/NetworkBehaviour.cs +++ b/Assets/Mirror/Runtime/NetworkBehaviour.cs @@ -74,19 +74,11 @@ protected void setSyncVarHookGuard(ulong dirtyBit, bool value) syncVarHookGuard &= ~dirtyBit; } - /// - /// objects that can synchronize themselves, such as synclists - /// + // SyncLists, SyncSets, etc. protected readonly List syncObjects = new List(); - /// - /// NetworkIdentity component caching for easier access - /// NetworkIdentity netIdentityCache; - - /// - /// Returns the NetworkIdentity of this object - /// + /// Returns the NetworkIdentity of this object public NetworkIdentity netIdentity { get @@ -104,14 +96,13 @@ public NetworkIdentity netIdentity } } - /// - /// Returns the index of the component on this object - /// + /// Returns the index of the component on this object public int ComponentIndex { get { // note: FindIndex causes allocations, we search manually instead + // TODO this is not fast at runtime uhh for (int i = 0; i < netIdentity.NetworkBehaviours.Length; i++) { NetworkBehaviour component = netIdentity.NetworkBehaviours[i];