diff --git a/Source/Tools/Flax.Build/Build/Plugins/NetworkingPlugin.cs b/Source/Tools/Flax.Build/Build/Plugins/NetworkingPlugin.cs index 63c9bacfa..ec23852d8 100644 --- a/Source/Tools/Flax.Build/Build/Plugins/NetworkingPlugin.cs +++ b/Source/Tools/Flax.Build/Build/Plugins/NetworkingPlugin.cs @@ -1244,15 +1244,16 @@ namespace Flax.Build.Plugins var methodRPC = new MethodRPC(); methodRPC.Type = type; methodRPC.Method = method; - methodRPC.IsServer = (bool)attribute.GetFieldValue("Server", false); - methodRPC.IsClient = (bool)attribute.GetFieldValue("Client", false); - methodRPC.Channel = (int)attribute.GetFieldValue("Channel", 4); // int as NetworkChannelType (default is ReliableOrdered=4) + methodRPC.Channel = 4; // int as NetworkChannelType (default is ReliableOrdered=4) if (attribute.HasConstructorArguments && attribute.ConstructorArguments.Count >= 3) { methodRPC.IsServer = (bool)attribute.ConstructorArguments[0].Value; methodRPC.IsClient = (bool)attribute.ConstructorArguments[1].Value; methodRPC.Channel = (int)attribute.ConstructorArguments[2].Value; } + methodRPC.IsServer = (bool)attribute.GetFieldValue("Server", methodRPC.IsServer); + methodRPC.IsClient = (bool)attribute.GetFieldValue("Client", methodRPC.IsClient); + methodRPC.Channel = (int)attribute.GetFieldValue("Channel", methodRPC.Channel); if (methodRPC.IsServer && methodRPC.IsClient) { MonoCecil.CompilationError($"Network RPC {method.Name} in {type.FullName} cannot be both Server and Client.", method);