diff --git a/Assets/Mirror/Editor/Weaver/Weaver.cs b/Assets/Mirror/Editor/Weaver/Weaver.cs index 0955d1009..8f506cc45 100644 --- a/Assets/Mirror/Editor/Weaver/Weaver.cs +++ b/Assets/Mirror/Editor/Weaver/Weaver.cs @@ -158,7 +158,7 @@ static bool WeaveModule(ModuleDefinition moduleDefinition) static void CreateGeneratedCodeClass() { // create "Mirror.GeneratedNetworkCode" class - GeneratedCodeClass = new TypeDefinition(Weaver.GeneratedCodeNamespace, Weaver.GeneratedCodeClassName, + GeneratedCodeClass = new TypeDefinition(GeneratedCodeNamespace, GeneratedCodeClassName, TypeAttributes.BeforeFieldInit | TypeAttributes.Class | TypeAttributes.AnsiClass | TypeAttributes.Public | TypeAttributes.AutoClass | TypeAttributes.Abstract | TypeAttributes.Sealed, WeaverTypes.Import()); }