diff --git a/Assets/Mirror/Editor/Weaver/Readers.cs b/Assets/Mirror/Editor/Weaver/Readers.cs index 9c001cb47..9bbca49f1 100644 --- a/Assets/Mirror/Editor/Weaver/Readers.cs +++ b/Assets/Mirror/Editor/Weaver/Readers.cs @@ -303,7 +303,6 @@ static void CreateNew(TypeReference variable, ILProcessor worker, TypeDefinition static void ReadAllFields(TypeReference variable, ILProcessor worker) { - uint fields = 0; foreach (FieldDefinition field in variable.FindAllPublicFields()) { // mismatched ldloca/ldloc for struct/class combinations is invalid IL, which causes crash at runtime @@ -322,7 +321,6 @@ static void ReadAllFields(TypeReference variable, ILProcessor worker) FieldReference fieldRef = Weaver.CurrentAssembly.MainModule.ImportReference(field); worker.Append(worker.Create(OpCodes.Stfld, fieldRef)); - fields++; } }