diff --git a/Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs index addadd521..684439e41 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs @@ -449,6 +449,7 @@ void DeserializeField(FieldDefinition syncVar, ILProcessor serWorker, MethodDefi return; } + // [SyncVar] GameObject/NetworkIdentity? if (syncVar.FieldType.FullName == Weaver.gameObjectType.FullName || syncVar.FieldType.FullName == Weaver.NetworkIdentityType.FullName) { @@ -487,6 +488,7 @@ void DeserializeField(FieldDefinition syncVar, ILProcessor serWorker, MethodDefi serWorker.Append(serWorker.Create(OpCodes.Ldloc, tmpValue)); serWorker.Append(serWorker.Create(OpCodes.Stfld, netIdField)); } + // [SyncVar] int/float/struct/etc.? else { MethodReference readFunc = Readers.GetReadFunc(syncVar.FieldType);