Skip to content

Commit a8f16aa

Browse files
authored
fix: NetworkBehaviourILPP to iterate over all types in an AsmDef (#803)
1 parent 2a77e53 commit a8f16aa

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

com.unity.multiplayer.mlapi/Editor/CodeGen/NetworkBehaviourILPP.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public override ILPostProcessResult Process(ICompiledAssembly compiledAssembly)
5454
if (ImportReferences(mainModule))
5555
{
5656
// process `NetworkBehaviour` types
57-
mainModule.Types
57+
mainModule.GetTypes()
5858
.Where(t => t.IsSubclassOf(CodeGenHelpers.NetworkBehaviour_FullName))
5959
.ToList()
6060
.ForEach(ProcessNetworkBehaviour);
@@ -583,12 +583,6 @@ private void ProcessNetworkBehaviour(TypeDefinition typeDefinition)
583583
instructions.Reverse();
584584
instructions.ForEach(instruction => processor.Body.Instructions.Insert(0, instruction));
585585
}
586-
587-
// process nested `NetworkBehaviour` types
588-
typeDefinition.NestedTypes
589-
.Where(t => t.IsSubclassOf(CodeGenHelpers.NetworkBehaviour_FullName))
590-
.ToList()
591-
.ForEach(ProcessNetworkBehaviour);
592586
}
593587

594588
private CustomAttribute CheckAndGetRPCAttribute(MethodDefinition methodDefinition)

0 commit comments

Comments
 (0)