diff --git a/.yamato/project.metafile b/.yamato/project.metafile index 6b06892cdf..e426916f8e 100644 --- a/.yamato/project.metafile +++ b/.yamato/project.metafile @@ -1,7 +1,7 @@ # Editors where tests will happen. The first entry of this array is also used # for validation test_editors: - - 2020.1 + - 2020.2 - trunk # Platforms that will be tested. The first entry in this array will also diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods.meta b/com.unity.multiplayer.mlapi/Editor/CodeGen.meta similarity index 77% rename from com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods.meta rename to com.unity.multiplayer.mlapi/Editor/CodeGen.meta index 688139f01e..0da94fd112 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods.meta +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 878d1bc1e46bd074aa63db708ec2a626 +guid: bbb4974b4302f435b9f4663c64d8f803 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/CodeGenHelpers.cs b/com.unity.multiplayer.mlapi/Editor/CodeGen/CodeGenHelpers.cs new file mode 100644 index 0000000000..91fabe6fb3 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/CodeGenHelpers.cs @@ -0,0 +1,196 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using MLAPI.Messaging; +using MLAPI.Serialization; +using Mono.Cecil; +using Mono.Cecil.Cil; +using Mono.Cecil.Rocks; +using Unity.CompilationPipeline.Common.Diagnostics; +using Unity.CompilationPipeline.Common.ILPostProcessing; +using UnityEngine; + +namespace MLAPI.Editor.CodeGen +{ + internal static class CodeGenHelpers + { + public const string RuntimeAssemblyName = "Unity.Multiplayer.MLAPI.Runtime"; + + public static readonly string NetworkBehaviour_FullName = typeof(NetworkedBehaviour).FullName; + public static readonly string ServerRpcAttribute_FullName = typeof(ServerRpcAttribute).FullName; + public static readonly string ClientRpcAttribute_FullName = typeof(ClientRpcAttribute).FullName; + public static readonly string ServerRpcParams_FullName = typeof(ServerRpcParams).FullName; + public static readonly string ClientRpcParams_FullName = typeof(ClientRpcParams).FullName; + public static readonly string INetworkSerializable_FullName = typeof(INetworkSerializable).FullName; + public static readonly string INetworkSerializable_NetworkRead_Name = nameof(INetworkSerializable.NetworkRead); + public static readonly string INetworkSerializable_NetworkWrite_Name = nameof(INetworkSerializable.NetworkWrite); + public static readonly string UnityColor_FullName = typeof(Color).FullName; + public static readonly string UnityVector2_FullName = typeof(Vector2).FullName; + public static readonly string UnityVector3_FullName = typeof(Vector3).FullName; + public static readonly string UnityVector4_FullName = typeof(Vector4).FullName; + public static readonly string UnityQuaternion_FullName = typeof(Quaternion).FullName; + public static readonly string UnityRay_FullName = typeof(Ray).FullName; + public static readonly string UnityRay2D_FullName = typeof(Ray2D).FullName; + + public static uint Hash(this MethodDefinition methodDefinition) + { + var sigArr = Encoding.UTF8.GetBytes($"{methodDefinition.Module.Name} / {methodDefinition.FullName}"); + var sigLen = sigArr.Length; + unsafe + { + fixed (byte* sigPtr = sigArr) + { + return XXHash.Hash32(sigPtr, sigLen); + } + } + } + + public static bool IsSubclassOf(this TypeDefinition typeDefinition, string ClassTypeFullName) + { + if (!typeDefinition.IsClass) return false; + + var baseTypeRef = typeDefinition.BaseType; + while (baseTypeRef != null) + { + if (baseTypeRef.FullName == ClassTypeFullName) + { + return true; + } + + try + { + baseTypeRef = baseTypeRef.Resolve().BaseType; + } + catch + { + return false; + } + } + + return false; + } + + public static bool HasInterface(this TypeReference typeReference, string InterfaceTypeFullName) + { + try + { + var typeDef = typeReference.Resolve(); + var typeFaces = typeDef.Interfaces; + return typeFaces.Any(iface => iface.InterfaceType.FullName == InterfaceTypeFullName); + } + catch + { + } + + return false; + } + + public static bool IsSupportedType(this TypeReference typeReference) + { + var typeSystem = typeReference.Module.TypeSystem; + + // common primitives + if (typeReference == typeSystem.Boolean) return true; + if (typeReference == typeSystem.Char) return true; + if (typeReference == typeSystem.SByte) return true; + if (typeReference == typeSystem.Byte) return true; + if (typeReference == typeSystem.Int16) return true; + if (typeReference == typeSystem.UInt16) return true; + if (typeReference == typeSystem.Int32) return true; + if (typeReference == typeSystem.UInt32) return true; + if (typeReference == typeSystem.Int64) return true; + if (typeReference == typeSystem.UInt64) return true; + if (typeReference == typeSystem.Single) return true; + if (typeReference == typeSystem.Double) return true; + if (typeReference == typeSystem.String) return true; + + // Unity primitives + if (typeReference.FullName == UnityColor_FullName) return true; + if (typeReference.FullName == UnityVector2_FullName) return true; + if (typeReference.FullName == UnityVector3_FullName) return true; + if (typeReference.FullName == UnityVector4_FullName) return true; + if (typeReference.FullName == UnityQuaternion_FullName) return true; + if (typeReference.FullName == UnityRay_FullName) return true; + if (typeReference.FullName == UnityRay2D_FullName) return true; + + // INetworkSerializable + if (typeReference.HasInterface(INetworkSerializable_FullName)) return true; + + // Enum + if (typeReference.GetEnumAsInt() != null) return true; + + // todo: [RFC] Serializable Types + // StaticArray[] + // IEnumerable + // IEnumerable> + // IEnumerable> + // IEnumerable> + + return false; + } + + public static TypeReference GetEnumAsInt(this TypeReference typeReference) + { + try + { + var typeDef = typeReference.Resolve(); + if (typeDef.IsEnum) + { + return typeDef.GetEnumUnderlyingType(); + } + } + catch + { + } + + return null; + } + + public static void AddError(this List diagnostics, string message) + { + diagnostics.AddError((SequencePoint)null, message); + } + + public static void AddError(this List diagnostics, MethodDefinition methodDefinition, string message) + { + diagnostics.AddError(methodDefinition.DebugInformation.SequencePoints.FirstOrDefault(), message); + } + + public static void AddError(this List diagnostics, SequencePoint sequencePoint, string message) + { + diagnostics.Add(new DiagnosticMessage + { + DiagnosticType = DiagnosticType.Error, + File = sequencePoint?.Document.Url.Replace($"{Environment.CurrentDirectory}{Path.DirectorySeparatorChar}", ""), + Line = sequencePoint?.StartLine ?? 0, + Column = sequencePoint?.StartColumn ?? 0, + MessageData = $" - {message}" + }); + } + + public static AssemblyDefinition AssemblyDefinitionFor(ICompiledAssembly compiledAssembly) + { + var assemblyResolver = new PostProcessorAssemblyResolver(compiledAssembly); + var readerParameters = new ReaderParameters + { + SymbolStream = new MemoryStream(compiledAssembly.InMemoryAssembly.PdbData), + SymbolReaderProvider = new PortablePdbReaderProvider(), + AssemblyResolver = assemblyResolver, + ReflectionImporterProvider = new PostProcessorReflectionImporterProvider(), + ReadingMode = ReadingMode.Immediate + }; + + var assemblyDefinition = AssemblyDefinition.ReadAssembly(new MemoryStream(compiledAssembly.InMemoryAssembly.PeData), readerParameters); + + //apparently, it will happen that when we ask to resolve a type that lives inside MLAPI.Runtime, and we + //are also postprocessing MLAPI.Runtime, type resolving will fail, because we do not actually try to resolve + //inside the assembly we are processing. Let's make sure we do that, so that we can use postprocessor features inside + //MLAPI.Runtime itself as well. + assemblyResolver.AddAssemblyDefinitionBeingOperatedOn(assemblyDefinition); + + return assemblyDefinition; + } + } +} diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnEveryoneExcept.cs.meta b/com.unity.multiplayer.mlapi/Editor/CodeGen/CodeGenHelpers.cs.meta similarity index 83% rename from com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnEveryoneExcept.cs.meta rename to com.unity.multiplayer.mlapi/Editor/CodeGen/CodeGenHelpers.cs.meta index 12d96131db..1c99993e2a 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnEveryoneExcept.cs.meta +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/CodeGenHelpers.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ff3c604d901e4b7499241b78cfab1f01 +guid: 0e5541b3bca0e43b48c2e694fffef5b3 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/NetworkBehaviourILPP.cs b/com.unity.multiplayer.mlapi/Editor/CodeGen/NetworkBehaviourILPP.cs new file mode 100644 index 0000000000..a479087b8f --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/NetworkBehaviourILPP.cs @@ -0,0 +1,1283 @@ +using System; +using System.IO; +using System.Linq; +using System.Collections.Generic; +using System.Reflection; +using MLAPI.Messaging; +using MLAPI.Serialization; +using Mono.Cecil; +using Mono.Cecil.Cil; +using Mono.Cecil.Rocks; +using Unity.CompilationPipeline.Common.Diagnostics; +using Unity.CompilationPipeline.Common.ILPostProcessing; +using MethodAttributes = Mono.Cecil.MethodAttributes; +using ParameterAttributes = Mono.Cecil.ParameterAttributes; + +namespace MLAPI.Editor.CodeGen +{ + internal sealed class NetworkBehaviourILPP : ILPostProcessor + { + public override ILPostProcessor GetInstance() => this; + + public override bool WillProcess(ICompiledAssembly compiledAssembly) => + compiledAssembly.Name == CodeGenHelpers.RuntimeAssemblyName || + compiledAssembly.References.Any(filePath => Path.GetFileNameWithoutExtension(filePath) == CodeGenHelpers.RuntimeAssemblyName); + + private readonly List _diagnostics = new List(); + + public override ILPostProcessResult Process(ICompiledAssembly compiledAssembly) + { + if (!WillProcess(compiledAssembly)) return null; + _diagnostics.Clear(); + + // read + var assemblyDefinition = CodeGenHelpers.AssemblyDefinitionFor(compiledAssembly); + if (assemblyDefinition == null) + { + _diagnostics.AddError($"Cannot read assembly definition: {compiledAssembly.Name}"); + return null; + } + + // process + var mainModule = assemblyDefinition.MainModule; + if (mainModule != null) + { + if (ImportReferences(mainModule)) + { + // process `NetworkBehaviour` types + mainModule.Types + .Where(t => t.IsSubclassOf(CodeGenHelpers.NetworkBehaviour_FullName)) + .ToList() + .ForEach(ProcessNetworkBehaviour); + } + else _diagnostics.AddError($"Cannot import references into main module: {mainModule.Name}"); + } + else _diagnostics.AddError($"Cannot get main module from assembly definition: {compiledAssembly.Name}"); + + // write + var pe = new MemoryStream(); + var pdb = new MemoryStream(); + + var writerParameters = new WriterParameters + { + SymbolWriterProvider = new PortablePdbWriterProvider(), + SymbolStream = pdb, + WriteSymbols = true + }; + + assemblyDefinition.Write(pe, writerParameters); + + return new ILPostProcessResult(new InMemoryAssembly(pe.ToArray(), pdb.ToArray()), _diagnostics); + } + + private TypeReference NetworkManager_TypeRef; + private FieldReference NetworkManager_ntable_FieldRef; + private MethodReference NetworkManager_ntable_Add_MethodRef; + private MethodReference NetworkManager_getSingleton_MethodRef; + private MethodReference NetworkManager_getIsListening_MethodRef; + private MethodReference NetworkManager_getIsHost_MethodRef; + private MethodReference NetworkManager_getIsServer_MethodRef; + private MethodReference NetworkManager_getIsClient_MethodRef; + private TypeReference NetworkBehaviour_TypeRef; + private MethodReference NetworkBehaviour_BeginSendServerRpc_MethodRef; + private MethodReference NetworkBehaviour_EndSendServerRpc_MethodRef; + private MethodReference NetworkBehaviour_BeginSendClientRpc_MethodRef; + private MethodReference NetworkBehaviour_EndSendClientRpc_MethodRef; + private FieldReference NetworkBehaviour_nexec_FieldRef; + private MethodReference NetworkHandlerDelegateCtor_MethodRef; + private TypeReference ServerRpcParams_TypeRef; + private FieldReference ServerRpcParams_Send_FieldRef; + private FieldReference ServerRpcParams_Receive_FieldRef; + private TypeReference ServerRpcSendParams_TypeRef; + private TypeReference ServerRpcReceiveParams_TypeRef; + private FieldReference ServerRpcReceiveParams_SenderClientId_FieldRef; + private TypeReference ClientRpcParams_TypeRef; + private FieldReference ClientRpcParams_Send_FieldRef; + private FieldReference ClientRpcParams_Receive_FieldRef; + private TypeReference ClientRpcSendParams_TypeRef; + private TypeReference ClientRpcReceiveParams_TypeRef; + private TypeReference BitWriter_TypeRef; + private MethodReference BitWriter_WriteBool_MethodRef; + private MethodReference BitWriter_WriteChar_MethodRef; + private MethodReference BitWriter_WriteSByte_MethodRef; + private MethodReference BitWriter_WriteByte_MethodRef; + private MethodReference BitWriter_WriteInt16Packed_MethodRef; + private MethodReference BitWriter_WriteUInt16Packed_MethodRef; + private MethodReference BitWriter_WriteInt32Packed_MethodRef; + private MethodReference BitWriter_WriteUInt32Packed_MethodRef; + private MethodReference BitWriter_WriteInt64Packed_MethodRef; + private MethodReference BitWriter_WriteUInt64Packed_MethodRef; + private MethodReference BitWriter_WriteSinglePacked_MethodRef; + private MethodReference BitWriter_WriteDoublePacked_MethodRef; + private MethodReference BitWriter_WriteStringPacked_MethodRef; + private MethodReference BitWriter_WriteColorPacked_MethodRef; + private MethodReference BitWriter_WriteVector2Packed_MethodRef; + private MethodReference BitWriter_WriteVector3Packed_MethodRef; + private MethodReference BitWriter_WriteVector4Packed_MethodRef; + private MethodReference BitWriter_WriteRotationPacked_MethodRef; + private MethodReference BitWriter_WriteRayPacked_MethodRef; + private MethodReference BitWriter_WriteRay2DPacked_MethodRef; + private TypeReference BitReader_TypeRef; + private MethodReference BitReader_ReadBool_MethodRef; + private MethodReference BitReader_ReadChar_MethodRef; + private MethodReference BitReader_ReadSByte_MethodRef; + private MethodReference BitReader_ReadByte_MethodRef; + private MethodReference BitReader_ReadInt16Packed_MethodRef; + private MethodReference BitReader_ReadUInt16Packed_MethodRef; + private MethodReference BitReader_ReadInt32Packed_MethodRef; + private MethodReference BitReader_ReadUInt32Packed_MethodRef; + private MethodReference BitReader_ReadInt64Packed_MethodRef; + private MethodReference BitReader_ReadUInt64Packed_MethodRef; + private MethodReference BitReader_ReadSinglePacked_MethodRef; + private MethodReference BitReader_ReadDoublePacked_MethodRef; + private MethodReference BitReader_ReadStringPacked_MethodRef; + private MethodReference BitReader_ReadColorPacked_MethodRef; + private MethodReference BitReader_ReadVector2Packed_MethodRef; + private MethodReference BitReader_ReadVector3Packed_MethodRef; + private MethodReference BitReader_ReadVector4Packed_MethodRef; + private MethodReference BitReader_ReadRotationPacked_MethodRef; + private MethodReference BitReader_ReadRayPacked_MethodRef; + private MethodReference BitReader_ReadRay2DPacked_MethodRef; + + private bool ImportReferences(ModuleDefinition moduleDefinition) + { + var networkManagerType = typeof(NetworkingManager); + NetworkManager_TypeRef = moduleDefinition.ImportReference(networkManagerType); + foreach (var propertyInfo in networkManagerType.GetProperties()) + { + switch (propertyInfo.Name) + { + case nameof(NetworkingManager.Singleton): + NetworkManager_getSingleton_MethodRef = moduleDefinition.ImportReference(propertyInfo.GetMethod); + break; + case nameof(NetworkingManager.IsListening): + NetworkManager_getIsListening_MethodRef = moduleDefinition.ImportReference(propertyInfo.GetMethod); + break; + case nameof(NetworkingManager.IsHost): + NetworkManager_getIsHost_MethodRef = moduleDefinition.ImportReference(propertyInfo.GetMethod); + break; + case nameof(NetworkingManager.IsServer): + NetworkManager_getIsServer_MethodRef = moduleDefinition.ImportReference(propertyInfo.GetMethod); + break; + case nameof(NetworkingManager.IsClient): + NetworkManager_getIsClient_MethodRef = moduleDefinition.ImportReference(propertyInfo.GetMethod); + break; + } + } + + foreach (var fieldInfo in networkManagerType.GetFields(BindingFlags.Static | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public)) + { + switch (fieldInfo.Name) + { + case nameof(NetworkingManager.__ntable): + NetworkManager_ntable_FieldRef = moduleDefinition.ImportReference(fieldInfo); + NetworkManager_ntable_Add_MethodRef = moduleDefinition.ImportReference(fieldInfo.FieldType.GetMethod("Add")); + break; + } + } + + var networkBehaviourType = typeof(NetworkedBehaviour); + NetworkBehaviour_TypeRef = moduleDefinition.ImportReference(networkBehaviourType); + foreach (var methodInfo in networkBehaviourType.GetMethods(BindingFlags.Static | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public)) + { + switch (methodInfo.Name) + { + case nameof(NetworkedBehaviour.BeginSendServerRpc): + NetworkBehaviour_BeginSendServerRpc_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(NetworkedBehaviour.EndSendServerRpc): + NetworkBehaviour_EndSendServerRpc_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(NetworkedBehaviour.BeginSendClientRpc): + NetworkBehaviour_BeginSendClientRpc_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(NetworkedBehaviour.EndSendClientRpc): + NetworkBehaviour_EndSendClientRpc_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + } + } + + foreach (var fieldInfo in networkBehaviourType.GetFields(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public)) + { + switch (fieldInfo.Name) + { + case nameof(NetworkedBehaviour.__nexec): + NetworkBehaviour_nexec_FieldRef = moduleDefinition.ImportReference(fieldInfo); + break; + } + } + + var networkHandlerDelegateType = typeof(Action); + NetworkHandlerDelegateCtor_MethodRef = moduleDefinition.ImportReference( + networkHandlerDelegateType + .GetConstructor(new[] {typeof(object), typeof(IntPtr)})); + + var serverRpcParamsType = typeof(ServerRpcParams); + ServerRpcParams_TypeRef = moduleDefinition.ImportReference(serverRpcParamsType); + foreach (var fieldInfo in serverRpcParamsType.GetFields()) + { + switch (fieldInfo.Name) + { + case nameof(ServerRpcParams.Send): + ServerRpcParams_Send_FieldRef = moduleDefinition.ImportReference(fieldInfo); + break; + case nameof(ServerRpcParams.Receive): + ServerRpcParams_Receive_FieldRef = moduleDefinition.ImportReference(fieldInfo); + break; + } + } + + var serverRpcSendParamsType = typeof(ServerRpcSendParams); + ServerRpcSendParams_TypeRef = moduleDefinition.ImportReference(serverRpcSendParamsType); + + var serverRpcReceiveParamsType = typeof(ServerRpcReceiveParams); + ServerRpcReceiveParams_TypeRef = moduleDefinition.ImportReference(serverRpcReceiveParamsType); + foreach (var fieldInfo in serverRpcReceiveParamsType.GetFields()) + { + switch (fieldInfo.Name) + { + case nameof(ServerRpcReceiveParams.SenderClientId): + ServerRpcReceiveParams_SenderClientId_FieldRef = moduleDefinition.ImportReference(fieldInfo); + break; + } + } + + var clientRpcParamsType = typeof(ClientRpcParams); + ClientRpcParams_TypeRef = moduleDefinition.ImportReference(clientRpcParamsType); + foreach (var fieldInfo in clientRpcParamsType.GetFields()) + { + switch (fieldInfo.Name) + { + case nameof(ClientRpcParams.Send): + ClientRpcParams_Send_FieldRef = moduleDefinition.ImportReference(fieldInfo); + break; + case nameof(ClientRpcParams.Receive): + ClientRpcParams_Receive_FieldRef = moduleDefinition.ImportReference(fieldInfo); + break; + } + } + + var clientRpcSendParamsType = typeof(ClientRpcSendParams); + ClientRpcSendParams_TypeRef = moduleDefinition.ImportReference(clientRpcSendParamsType); + + var clientRpcReceiveParamsType = typeof(ClientRpcReceiveParams); + ClientRpcReceiveParams_TypeRef = moduleDefinition.ImportReference(clientRpcReceiveParamsType); + + var bitWriterType = typeof(BitWriter); + BitWriter_TypeRef = moduleDefinition.ImportReference(bitWriterType); + foreach (var methodInfo in bitWriterType.GetMethods()) + { + switch (methodInfo.Name) + { + case nameof(BitWriter.WriteBool): + BitWriter_WriteBool_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteChar): + BitWriter_WriteChar_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteSByte): + BitWriter_WriteSByte_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteByte): + BitWriter_WriteByte_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteInt16Packed): + BitWriter_WriteInt16Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteUInt16Packed): + BitWriter_WriteUInt16Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteInt32Packed): + BitWriter_WriteInt32Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteUInt32Packed): + BitWriter_WriteUInt32Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteInt64Packed): + BitWriter_WriteInt64Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteUInt64Packed): + BitWriter_WriteUInt64Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteSinglePacked): + BitWriter_WriteSinglePacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteDoublePacked): + BitWriter_WriteDoublePacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteStringPacked): + BitWriter_WriteStringPacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteColorPacked): + BitWriter_WriteColorPacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteVector2Packed): + BitWriter_WriteVector2Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteVector3Packed): + BitWriter_WriteVector3Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteVector4Packed): + BitWriter_WriteVector4Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteRotationPacked): + BitWriter_WriteRotationPacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteRayPacked): + BitWriter_WriteRayPacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitWriter.WriteRay2DPacked): + BitWriter_WriteRay2DPacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + } + } + + var bitReaderType = typeof(BitReader); + BitReader_TypeRef = moduleDefinition.ImportReference(bitReaderType); + foreach (var methodInfo in bitReaderType.GetMethods()) + { + switch (methodInfo.Name) + { + case nameof(BitReader.ReadBool): + BitReader_ReadBool_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadChar): + BitReader_ReadChar_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadSByte): + BitReader_ReadSByte_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadByte): + BitReader_ReadByte_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadInt16Packed): + BitReader_ReadInt16Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadUInt16Packed): + BitReader_ReadUInt16Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadInt32Packed): + BitReader_ReadInt32Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadUInt32Packed): + BitReader_ReadUInt32Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadInt64Packed): + BitReader_ReadInt64Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadUInt64Packed): + BitReader_ReadUInt64Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadSinglePacked): + BitReader_ReadSinglePacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadDoublePacked): + BitReader_ReadDoublePacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadStringPacked): + BitReader_ReadStringPacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadColorPacked): + BitReader_ReadColorPacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadVector2Packed): + BitReader_ReadVector2Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadVector3Packed): + BitReader_ReadVector3Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadVector4Packed): + BitReader_ReadVector4Packed_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadRotationPacked): + BitReader_ReadRotationPacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadRayPacked): + BitReader_ReadRayPacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + case nameof(BitReader.ReadRay2DPacked): + BitReader_ReadRay2DPacked_MethodRef = moduleDefinition.ImportReference(methodInfo); + break; + } + } + + return true; + } + + private void ProcessNetworkBehaviour(TypeDefinition typeDefinition) + { + var staticHandlers = new List<(uint Hash, MethodDefinition Method)>(); + foreach (var methodDefinition in typeDefinition.Methods) + { + var rpcAttribute = CheckAndGetRPCAttribute(methodDefinition); + if (rpcAttribute == null) continue; + + var methodDefHash = methodDefinition.Hash(); + if (methodDefHash == 0) continue; + + InjectWriteAndCallBlocks(methodDefinition, rpcAttribute, methodDefHash); + staticHandlers.Add((methodDefHash, GenerateStaticHandler(methodDefinition, rpcAttribute))); + } + + if (staticHandlers.Count > 0) + { + var staticCtorMethodDef = typeDefinition.GetStaticConstructor(); + if (staticCtorMethodDef == null) + { + staticCtorMethodDef = new MethodDefinition( + ".cctor", // Static Constructor (constant-constructor) + MethodAttributes.HideBySig | + MethodAttributes.SpecialName | + MethodAttributes.RTSpecialName | + MethodAttributes.Static, + typeDefinition.Module.TypeSystem.Void); + staticCtorMethodDef.Body.Instructions.Add(Instruction.Create(OpCodes.Ret)); + typeDefinition.Methods.Add(staticCtorMethodDef); + } + + var instructions = new List(); + var processor = staticCtorMethodDef.Body.GetILProcessor(); + foreach (var (hash, method) in staticHandlers) + { + if (hash == 0 || method == null) continue; + + typeDefinition.Methods.Add(method); + + // NetworkManager.__ntable.Add(HandlerHash, HandlerMethod); + instructions.Add(processor.Create(OpCodes.Ldsfld, NetworkManager_ntable_FieldRef)); + instructions.Add(processor.Create(OpCodes.Ldc_I4, unchecked((int)hash))); + instructions.Add(processor.Create(OpCodes.Ldnull)); + instructions.Add(processor.Create(OpCodes.Ldftn, method)); + instructions.Add(processor.Create(OpCodes.Newobj, NetworkHandlerDelegateCtor_MethodRef)); + instructions.Add(processor.Create(OpCodes.Call, NetworkManager_ntable_Add_MethodRef)); + } + + instructions.Reverse(); + instructions.ForEach(instruction => processor.Body.Instructions.Insert(0, instruction)); + } + + // process nested `NetworkBehaviour` types + typeDefinition.NestedTypes + .Where(t => t.IsSubclassOf(CodeGenHelpers.NetworkBehaviour_FullName)) + .ToList() + .ForEach(ProcessNetworkBehaviour); + } + + private CustomAttribute CheckAndGetRPCAttribute(MethodDefinition methodDefinition) + { + CustomAttribute rpcAttribute = null; + bool isServerRpc = false; + foreach (var customAttribute in methodDefinition.CustomAttributes) + { + var customAttributeType_FullName = customAttribute.AttributeType.FullName; + + if (customAttributeType_FullName == CodeGenHelpers.ServerRpcAttribute_FullName || + customAttributeType_FullName == CodeGenHelpers.ClientRpcAttribute_FullName) + { + bool isValid = true; + + if (methodDefinition.IsStatic) + { + _diagnostics.AddError(methodDefinition, "RPC method must not be static!"); + isValid = false; + } + + if (methodDefinition.IsAbstract) + { + _diagnostics.AddError(methodDefinition, "RPC method must not be abstract!"); + isValid = false; + } + + if (methodDefinition.ReturnType != methodDefinition.Module.TypeSystem.Void) + { + _diagnostics.AddError(methodDefinition, "RPC method must return `void`!"); + isValid = false; + } + + if (customAttributeType_FullName == CodeGenHelpers.ServerRpcAttribute_FullName && + !methodDefinition.Name.EndsWith("ServerRpc", StringComparison.OrdinalIgnoreCase)) + { + _diagnostics.AddError(methodDefinition, "ServerRpc method must end with 'ServerRpc' suffix!"); + isValid = false; + } + + if (customAttributeType_FullName == CodeGenHelpers.ClientRpcAttribute_FullName && + !methodDefinition.Name.EndsWith("ClientRpc", StringComparison.OrdinalIgnoreCase)) + { + _diagnostics.AddError(methodDefinition, "ClientRpc method must end with 'ClientRpc' suffix!"); + isValid = false; + } + + if (isValid) + { + isServerRpc = customAttributeType_FullName == CodeGenHelpers.ServerRpcAttribute_FullName; + rpcAttribute = customAttribute; + } + } + } + + if (rpcAttribute == null) + { + if (methodDefinition.Name.EndsWith("ServerRpc", StringComparison.OrdinalIgnoreCase)) + { + _diagnostics.AddError(methodDefinition, "ServerRpc method must be marked with 'ServerRpc' attribute!"); + } + else if (methodDefinition.Name.EndsWith("ClientRpc", StringComparison.OrdinalIgnoreCase)) + { + _diagnostics.AddError(methodDefinition, "ClientRpc method must be marked with 'ClientRpc' attribute!"); + } + + return null; + } + + int paramCount = methodDefinition.Parameters.Count; + for (int paramIndex = 0; paramIndex < paramCount; ++paramIndex) + { + var paramDef = methodDefinition.Parameters[paramIndex]; + var paramType = paramDef.ParameterType; + + if (paramType.IsSupportedType()) continue; + + // ServerRpcParams + if (paramType.FullName == CodeGenHelpers.ServerRpcParams_FullName && isServerRpc && paramIndex == paramCount - 1) continue; + // ClientRpcParams + if (paramType.FullName == CodeGenHelpers.ClientRpcParams_FullName && !isServerRpc && paramIndex == paramCount - 1) continue; + + _diagnostics.AddError(methodDefinition, $"RPC method parameter does not support serialization: {paramType.FullName}"); + rpcAttribute = null; + } + + return rpcAttribute; + } + + private void InjectWriteAndCallBlocks(MethodDefinition methodDefinition, CustomAttribute rpcAttribute, uint methodDefHash) + { + var typeSystem = methodDefinition.Module.TypeSystem; + var instructions = new List(); + var processor = methodDefinition.Body.GetILProcessor(); + var isServerRpc = rpcAttribute.AttributeType.FullName == CodeGenHelpers.ServerRpcAttribute_FullName; + var isReliableRpc = true; + foreach (var attrField in rpcAttribute.Fields) + { + switch (attrField.Name) + { + case nameof(RpcAttribute.IsReliable): + isReliableRpc = attrField.Argument.Type == typeSystem.Boolean && (bool)attrField.Argument.Value; + break; + } + } + + var paramCount = methodDefinition.Parameters.Count; + var hasRpcParams = + paramCount > 0 && + ((isServerRpc && methodDefinition.Parameters[paramCount - 1].ParameterType.FullName == CodeGenHelpers.ServerRpcParams_FullName) || + (!isServerRpc && methodDefinition.Parameters[paramCount - 1].ParameterType.FullName == CodeGenHelpers.ClientRpcParams_FullName)); + + methodDefinition.Body.InitLocals = true; + // NetworkManager networkManager; + methodDefinition.Body.Variables.Add(new VariableDefinition(NetworkManager_TypeRef)); + int netManLocIdx = methodDefinition.Body.Variables.Count - 1; + // BitWriter writer; + methodDefinition.Body.Variables.Add(new VariableDefinition(BitWriter_TypeRef)); + int writerLocIdx = methodDefinition.Body.Variables.Count - 1; + // XXXRpcSendParams + if (!hasRpcParams) methodDefinition.Body.Variables.Add(new VariableDefinition(isServerRpc ? ServerRpcSendParams_TypeRef : ClientRpcSendParams_TypeRef)); + int sendParamsIdx = !hasRpcParams ? methodDefinition.Body.Variables.Count - 1 : -1; + + { + var returnInstr = processor.Create(OpCodes.Ret); + var lastInstr = processor.Create(OpCodes.Nop); + + // networkManager = NetworkManager.Singleton; + instructions.Add(processor.Create(OpCodes.Call, NetworkManager_getSingleton_MethodRef)); + instructions.Add(processor.Create(OpCodes.Stloc, netManLocIdx)); + + // if (networkManager == null || !networkManager.IsListening) return; + instructions.Add(processor.Create(OpCodes.Ldloc, netManLocIdx)); + instructions.Add(processor.Create(OpCodes.Brfalse, returnInstr)); + instructions.Add(processor.Create(OpCodes.Ldloc, netManLocIdx)); + instructions.Add(processor.Create(OpCodes.Callvirt, NetworkManager_getIsListening_MethodRef)); + instructions.Add(processor.Create(OpCodes.Brtrue, lastInstr)); + + instructions.Add(returnInstr); + instructions.Add(lastInstr); + } + + { + var beginInstr = processor.Create(OpCodes.Nop); + var endInstr = processor.Create(OpCodes.Nop); + var lastInstr = processor.Create(OpCodes.Nop); + + // if (__nexec != NExec.Server) -> ServerRpc + // if (__nexec != NExec.Client) -> ClientRpc + instructions.Add(processor.Create(OpCodes.Ldarg_0)); + instructions.Add(processor.Create(OpCodes.Ldfld, NetworkBehaviour_nexec_FieldRef)); + instructions.Add(processor.Create(OpCodes.Ldc_I4, (int)(isServerRpc ? NetworkedBehaviour.NExec.Server : NetworkedBehaviour.NExec.Client))); + instructions.Add(processor.Create(OpCodes.Ceq)); + instructions.Add(processor.Create(OpCodes.Ldc_I4, 0)); + instructions.Add(processor.Create(OpCodes.Ceq)); + instructions.Add(processor.Create(OpCodes.Brfalse, lastInstr)); + + // if (networkManager.IsClient || networkManager.IsHost) { ... } -> ServerRpc + // if (networkManager.IsServer || networkManager.IsHost) { ... } -> ClientRpc + instructions.Add(processor.Create(OpCodes.Ldloc, netManLocIdx)); + instructions.Add(processor.Create(OpCodes.Callvirt, isServerRpc ? NetworkManager_getIsClient_MethodRef : NetworkManager_getIsServer_MethodRef)); + instructions.Add(processor.Create(OpCodes.Brtrue, beginInstr)); + instructions.Add(processor.Create(OpCodes.Ldloc, netManLocIdx)); + instructions.Add(processor.Create(OpCodes.Callvirt, NetworkManager_getIsHost_MethodRef)); + instructions.Add(processor.Create(OpCodes.Brfalse, lastInstr)); + + instructions.Add(beginInstr); + + // var writer = BeginSendServerRpc(sendParams, isReliable) -> ServerRpc + // var writer = BeginSendClientRpc(sendParams, isReliable) -> ClientRpc + if (isServerRpc) + { + // ServerRpc + // var writer = BeginSendServerRpc(sendParams, isReliable); + instructions.Add(processor.Create(OpCodes.Ldarg_0)); + + if (hasRpcParams) + { + // rpcParams.Send + instructions.Add(processor.Create(OpCodes.Ldarg, paramCount)); + instructions.Add(processor.Create(OpCodes.Ldfld, ServerRpcParams_Send_FieldRef)); + } + else + { + // default + instructions.Add(processor.Create(OpCodes.Ldloca, sendParamsIdx)); + instructions.Add(processor.Create(OpCodes.Initobj, ServerRpcSendParams_TypeRef)); + instructions.Add(processor.Create(OpCodes.Ldloc, sendParamsIdx)); + } + + // isReliable + instructions.Add(processor.Create(isReliableRpc ? OpCodes.Ldc_I4_1 : OpCodes.Ldc_I4_0)); + + // BeginSendServerRpc + instructions.Add(processor.Create(OpCodes.Call, NetworkBehaviour_BeginSendServerRpc_MethodRef)); + instructions.Add(processor.Create(OpCodes.Stloc, writerLocIdx)); + } + else + { + // ClientRpc + // var writer = BeginSendClientRpc(sendParams, isReliable); + instructions.Add(processor.Create(OpCodes.Ldarg_0)); + + if (hasRpcParams) + { + // rpcParams.Send + instructions.Add(processor.Create(OpCodes.Ldarg, paramCount)); + instructions.Add(processor.Create(OpCodes.Ldfld, ClientRpcParams_Send_FieldRef)); + } + else + { + // default + instructions.Add(processor.Create(OpCodes.Ldloca, sendParamsIdx)); + instructions.Add(processor.Create(OpCodes.Initobj, ClientRpcSendParams_TypeRef)); + instructions.Add(processor.Create(OpCodes.Ldloc, sendParamsIdx)); + } + + // isReliable + instructions.Add(processor.Create(isReliableRpc ? OpCodes.Ldc_I4_1 : OpCodes.Ldc_I4_0)); + + // BeginSendClientRpc + instructions.Add(processor.Create(OpCodes.Call, NetworkBehaviour_BeginSendClientRpc_MethodRef)); + instructions.Add(processor.Create(OpCodes.Stloc, writerLocIdx)); + } + + // if (writer != null) + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Brfalse, endInstr)); + + // writer.WriteUInt32Packed(123123); // NetworkMethodId + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldc_I4, unchecked((int)methodDefHash))); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteUInt32Packed_MethodRef)); + // write method parameters into stream + for (int paramIndex = 0; paramIndex < paramCount; ++paramIndex) + { + var paramDef = methodDefinition.Parameters[paramIndex]; + var paramType = paramDef.ParameterType; + + if (paramType == typeSystem.Boolean) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteBool_MethodRef)); + continue; + } + + if (paramType == typeSystem.Char) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteChar_MethodRef)); + continue; + } + + if (paramType == typeSystem.SByte) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteSByte_MethodRef)); + continue; + } + + if (paramType == typeSystem.Byte) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteByte_MethodRef)); + continue; + } + + if (paramType == typeSystem.Int16) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteInt16Packed_MethodRef)); + continue; + } + + if (paramType == typeSystem.UInt16) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteUInt16Packed_MethodRef)); + continue; + } + + if (paramType == typeSystem.Int32) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteInt32Packed_MethodRef)); + continue; + } + + if (paramType == typeSystem.UInt32) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteUInt32Packed_MethodRef)); + continue; + } + + if (paramType == typeSystem.Int64) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteInt64Packed_MethodRef)); + continue; + } + + if (paramType == typeSystem.UInt64) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteUInt64Packed_MethodRef)); + continue; + } + + if (paramType == typeSystem.Single) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteSinglePacked_MethodRef)); + continue; + } + + if (paramType == typeSystem.Double) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteDoublePacked_MethodRef)); + continue; + } + + if (paramType == typeSystem.String) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteStringPacked_MethodRef)); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityColor_FullName) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteColorPacked_MethodRef)); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityVector2_FullName) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteVector2Packed_MethodRef)); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityVector3_FullName) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteVector3Packed_MethodRef)); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityVector4_FullName) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteVector4Packed_MethodRef)); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityQuaternion_FullName) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteRotationPacked_MethodRef)); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityRay_FullName) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteRayPacked_MethodRef)); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityRay2D_FullName) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteRay2DPacked_MethodRef)); + continue; + } + + // INetworkSerializable + if (paramType.HasInterface(CodeGenHelpers.INetworkSerializable_FullName)) + { + var paramTypeDef = paramType.Resolve(); + var paramTypeNetworkWrite_MethodDef = paramTypeDef.Methods.FirstOrDefault(m => m.Name == CodeGenHelpers.INetworkSerializable_NetworkWrite_Name); + if (paramTypeNetworkWrite_MethodDef != null) + { + if (paramType.IsValueType) + { + // struct (pass by value) + instructions.Add(processor.Create(OpCodes.Ldarga, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Call, paramTypeNetworkWrite_MethodDef)); + } + else + { + // class (pass by reference) + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Callvirt, paramTypeNetworkWrite_MethodDef)); + } + + continue; + } + } + + // Enum + { + var paramEnumType = paramType.GetEnumAsInt(); + if (paramEnumType != null) + { + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + instructions.Add(processor.Create(OpCodes.Ldarg, paramIndex + 1)); + if (paramEnumType == typeSystem.SByte) instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteSByte_MethodRef)); + if (paramEnumType == typeSystem.Byte) instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteByte_MethodRef)); + if (paramEnumType == typeSystem.Int16) instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteInt16Packed_MethodRef)); + if (paramEnumType == typeSystem.UInt16) instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteUInt16Packed_MethodRef)); + if (paramEnumType == typeSystem.Int32) instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteInt32Packed_MethodRef)); + if (paramEnumType == typeSystem.UInt32) instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteUInt32Packed_MethodRef)); + if (paramEnumType == typeSystem.Int64) instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteInt64Packed_MethodRef)); + if (paramEnumType == typeSystem.UInt64) instructions.Add(processor.Create(OpCodes.Callvirt, BitWriter_WriteUInt64Packed_MethodRef)); + + continue; + } + } + } + + instructions.Add(endInstr); + + // EndSendServerRpc(writer, sendParams, isReliable) -> ServerRpc + // EndSendClientRpc(writer, sendParams, isReliable) -> ClientRpc + if (isServerRpc) + { + // ServerRpc + // EndSendServerRpc(writer, sendParams, isReliable); + instructions.Add(processor.Create(OpCodes.Ldarg_0)); + + // writer + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + + if (hasRpcParams) + { + // rpcParams.Send + instructions.Add(processor.Create(OpCodes.Ldarg, paramCount)); + instructions.Add(processor.Create(OpCodes.Ldfld, ServerRpcParams_Send_FieldRef)); + } + else + { + // default + instructions.Add(processor.Create(OpCodes.Ldloc, sendParamsIdx)); + } + + // isReliable + instructions.Add(processor.Create(isReliableRpc ? OpCodes.Ldc_I4_1 : OpCodes.Ldc_I4_0)); + + // EndSendServerRpc + instructions.Add(processor.Create(OpCodes.Call, NetworkBehaviour_EndSendServerRpc_MethodRef)); + } + else + { + // ClientRpc + // EndSendClientRpc(writer, sendParams, isReliable); + instructions.Add(processor.Create(OpCodes.Ldarg_0)); + + // writer + instructions.Add(processor.Create(OpCodes.Ldloc, writerLocIdx)); + + if (hasRpcParams) + { + // rpcParams.Send + instructions.Add(processor.Create(OpCodes.Ldarg, paramCount)); + instructions.Add(processor.Create(OpCodes.Ldfld, ClientRpcParams_Send_FieldRef)); + } + else + { + // default + instructions.Add(processor.Create(OpCodes.Ldloc, sendParamsIdx)); + } + + // isReliable + instructions.Add(processor.Create(isReliableRpc ? OpCodes.Ldc_I4_1 : OpCodes.Ldc_I4_0)); + + // EndSendClientRpc + instructions.Add(processor.Create(OpCodes.Call, NetworkBehaviour_EndSendClientRpc_MethodRef)); + } + + instructions.Add(lastInstr); + } + + { + var returnInstr = processor.Create(OpCodes.Ret); + var lastInstr = processor.Create(OpCodes.Nop); + + // if (__nexec == NExec.Server) -> ServerRpc + // if (__nexec == NExec.Client) -> ClientRpc + instructions.Add(processor.Create(OpCodes.Ldarg_0)); + instructions.Add(processor.Create(OpCodes.Ldfld, NetworkBehaviour_nexec_FieldRef)); + instructions.Add(processor.Create(OpCodes.Ldc_I4, (int)(isServerRpc ? NetworkedBehaviour.NExec.Server : NetworkedBehaviour.NExec.Client))); + instructions.Add(processor.Create(OpCodes.Ceq)); + instructions.Add(processor.Create(OpCodes.Brfalse, returnInstr)); + + // if (networkManager.IsServer || networkManager.IsHost) -> ServerRpc + // if (networkManager.IsClient || networkManager.IsHost) -> ClientRpc + instructions.Add(processor.Create(OpCodes.Ldloc, netManLocIdx)); + instructions.Add(processor.Create(OpCodes.Callvirt, isServerRpc ? NetworkManager_getIsServer_MethodRef : NetworkManager_getIsClient_MethodRef)); + instructions.Add(processor.Create(OpCodes.Brtrue, lastInstr)); + instructions.Add(processor.Create(OpCodes.Ldloc, netManLocIdx)); + instructions.Add(processor.Create(OpCodes.Callvirt, NetworkManager_getIsHost_MethodRef)); + instructions.Add(processor.Create(OpCodes.Brtrue, lastInstr)); + + instructions.Add(returnInstr); + instructions.Add(lastInstr); + } + + instructions.Reverse(); + instructions.ForEach(instruction => processor.Body.Instructions.Insert(0, instruction)); + } + + private MethodDefinition GenerateStaticHandler(MethodDefinition methodDefinition, CustomAttribute rpcAttribute) + { + var typeSystem = methodDefinition.Module.TypeSystem; + var nhandler = new MethodDefinition( + $"{methodDefinition.Name}__nhandler", + MethodAttributes.Private | MethodAttributes.Static | MethodAttributes.HideBySig, + methodDefinition.Module.TypeSystem.Void); + nhandler.Parameters.Add(new ParameterDefinition("target", ParameterAttributes.None, NetworkBehaviour_TypeRef)); + nhandler.Parameters.Add(new ParameterDefinition("reader", ParameterAttributes.None, BitReader_TypeRef)); + nhandler.Parameters.Add(new ParameterDefinition("sender", ParameterAttributes.None, typeSystem.UInt64)); + + var processor = nhandler.Body.GetILProcessor(); + var isServerRpc = rpcAttribute.AttributeType.FullName == CodeGenHelpers.ServerRpcAttribute_FullName; + + nhandler.Body.InitLocals = true; + // read method parameters from stream + int paramCount = methodDefinition.Parameters.Count; + for (int paramIndex = 0; paramIndex < paramCount; ++paramIndex) + { + var paramDef = methodDefinition.Parameters[paramIndex]; + var paramType = paramDef.ParameterType; + + // local variable to storage argument + nhandler.Body.Variables.Add(new VariableDefinition(paramType)); + + if (paramType == typeSystem.Boolean) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadBool_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType == typeSystem.Char) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadChar_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType == typeSystem.SByte) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadSByte_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType == typeSystem.Byte) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadByte_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType == typeSystem.Int16) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadInt16Packed_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType == typeSystem.UInt16) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadUInt16Packed_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType == typeSystem.Int32) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadInt32Packed_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType == typeSystem.UInt32) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadUInt32Packed_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType == typeSystem.Int64) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadInt64Packed_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType == typeSystem.UInt64) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadUInt64Packed_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType == typeSystem.Single) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadSinglePacked_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType == typeSystem.Double) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadDoublePacked_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType == typeSystem.String) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Ldnull); + processor.Emit(OpCodes.Callvirt, BitReader_ReadStringPacked_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityColor_FullName) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadColorPacked_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityVector2_FullName) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadVector2Packed_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityVector3_FullName) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadVector3Packed_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityVector4_FullName) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadVector4Packed_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityQuaternion_FullName) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadRotationPacked_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityRay_FullName) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadRayPacked_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + if (paramType.FullName == CodeGenHelpers.UnityRay2D_FullName) + { + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, BitReader_ReadRay2DPacked_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + continue; + } + + // INetworkSerializable + if (paramType.HasInterface(CodeGenHelpers.INetworkSerializable_FullName)) + { + var paramTypeDef = paramType.Resolve(); + var paramTypeNetworkRead_MethodDef = paramTypeDef.Methods.FirstOrDefault(m => m.Name == CodeGenHelpers.INetworkSerializable_NetworkRead_Name); + if (paramTypeNetworkRead_MethodDef != null) + { + if (paramType.IsValueType) + { + // struct (pass by value) + processor.Emit(OpCodes.Ldloca, paramIndex); + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Call, paramTypeNetworkRead_MethodDef); + } + else + { + // class (pass by reference) + var paramTypeDefCtor = paramTypeDef.GetConstructors().FirstOrDefault(m => m.Parameters.Count == 0); + if (paramTypeDefCtor != null) + { + // new INetworkSerializable() + processor.Emit(OpCodes.Newobj, paramTypeDefCtor); + processor.Emit(OpCodes.Stloc, paramIndex); + + // INetworkSerializable.NetworkRead(reader) + processor.Emit(OpCodes.Ldloc, paramIndex); + processor.Emit(OpCodes.Ldarg_1); + processor.Emit(OpCodes.Callvirt, paramTypeNetworkRead_MethodDef); + } + } + + continue; + } + } + + // Enum + { + var paramEnumType = paramType.GetEnumAsInt(); + if (paramEnumType != null) + { + processor.Emit(OpCodes.Ldarg_1); + if (paramEnumType == typeSystem.SByte) processor.Emit(OpCodes.Callvirt, BitReader_ReadSByte_MethodRef); + if (paramEnumType == typeSystem.Byte) processor.Emit(OpCodes.Callvirt, BitReader_ReadByte_MethodRef); + if (paramEnumType == typeSystem.Int16) processor.Emit(OpCodes.Callvirt, BitReader_ReadInt16Packed_MethodRef); + if (paramEnumType == typeSystem.UInt16) processor.Emit(OpCodes.Callvirt, BitReader_ReadUInt16Packed_MethodRef); + if (paramEnumType == typeSystem.Int32) processor.Emit(OpCodes.Callvirt, BitReader_ReadInt32Packed_MethodRef); + if (paramEnumType == typeSystem.UInt32) processor.Emit(OpCodes.Callvirt, BitReader_ReadUInt32Packed_MethodRef); + if (paramEnumType == typeSystem.Int64) processor.Emit(OpCodes.Callvirt, BitReader_ReadInt64Packed_MethodRef); + if (paramEnumType == typeSystem.UInt64) processor.Emit(OpCodes.Callvirt, BitReader_ReadUInt64Packed_MethodRef); + processor.Emit(OpCodes.Stloc, paramIndex); + + continue; + } + } + + // ServerRpcParams, ClientRpcParams + { + // ServerRpcParams + if (paramType.FullName == CodeGenHelpers.ServerRpcParams_FullName) + { + processor.Emit(OpCodes.Ldloca, paramIndex); + processor.Emit(OpCodes.Ldflda, ServerRpcParams_Receive_FieldRef); + processor.Emit(OpCodes.Ldarg_2); + processor.Emit(OpCodes.Stfld, ServerRpcReceiveParams_SenderClientId_FieldRef); + continue; + } + + // ClientRpcParams + if (paramType.FullName == CodeGenHelpers.ClientRpcParams_FullName) + { + continue; + } + } + } + + // NetworkBehaviour.__nexec = NExec.Server; -> ServerRpc + // NetworkBehaviour.__nexec = NExec.Client; -> ClientRpc + processor.Emit(OpCodes.Ldarg_0); + processor.Emit(OpCodes.Ldc_I4, (int)(isServerRpc ? NetworkedBehaviour.NExec.Server : NetworkedBehaviour.NExec.Client)); + processor.Emit(OpCodes.Stfld, NetworkBehaviour_nexec_FieldRef); + + // NetworkBehaviour.XXXRpc(...); + processor.Emit(OpCodes.Ldarg_0); + processor.Emit(OpCodes.Castclass, methodDefinition.DeclaringType); + Enumerable.Range(0, paramCount).ToList().ForEach(paramIndex => processor.Emit(OpCodes.Ldloc, paramIndex)); + processor.Emit(OpCodes.Callvirt, methodDefinition); + + // NetworkBehaviour.__nexec = NExec.None; + processor.Emit(OpCodes.Ldarg_0); + processor.Emit(OpCodes.Ldc_I4, (int)NetworkedBehaviour.NExec.None); + processor.Emit(OpCodes.Stfld, NetworkBehaviour_nexec_FieldRef); + + processor.Emit(OpCodes.Ret); + return nhandler; + } + } +} diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnClient.cs.meta b/com.unity.multiplayer.mlapi/Editor/CodeGen/NetworkBehaviourILPP.cs.meta similarity index 83% rename from com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnClient.cs.meta rename to com.unity.multiplayer.mlapi/Editor/CodeGen/NetworkBehaviourILPP.cs.meta index 99eaf6d1c3..9ff430974c 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnClient.cs.meta +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/NetworkBehaviourILPP.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 45bd3269f2814bc408f9421698d9ae3b +guid: cf1c8b78182704372820a586c1c91d97 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorAssemblyResolver.cs b/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorAssemblyResolver.cs new file mode 100644 index 0000000000..483a1bfc3a --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorAssemblyResolver.cs @@ -0,0 +1,128 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using Mono.Cecil; +using Unity.CompilationPipeline.Common.ILPostProcessing; + +namespace MLAPI.Editor.CodeGen +{ + class PostProcessorAssemblyResolver : IAssemblyResolver + { + private readonly string[] _assemblyReferences; + private readonly Dictionary _assemblyCache = new Dictionary(); + private readonly ICompiledAssembly _compiledAssembly; + private AssemblyDefinition _selfAssembly; + + public PostProcessorAssemblyResolver(ICompiledAssembly compiledAssembly) + { + _compiledAssembly = compiledAssembly; + _assemblyReferences = compiledAssembly.References; + } + + public void Dispose() + { + } + + public AssemblyDefinition Resolve(AssemblyNameReference name) => Resolve(name, new ReaderParameters(ReadingMode.Deferred)); + + public AssemblyDefinition Resolve(AssemblyNameReference name, ReaderParameters parameters) + { + lock (_assemblyCache) + { + if (name.Name == _compiledAssembly.Name) + return _selfAssembly; + + var fileName = FindFile(name); + if (fileName == null) + return null; + + var lastWriteTime = File.GetLastWriteTime(fileName); + + var cacheKey = fileName + lastWriteTime; + + if (_assemblyCache.TryGetValue(cacheKey, out var result)) + return result; + + parameters.AssemblyResolver = this; + + var ms = MemoryStreamFor(fileName); + + var pdb = fileName + ".pdb"; + if (File.Exists(pdb)) + parameters.SymbolStream = MemoryStreamFor(pdb); + + var assemblyDefinition = AssemblyDefinition.ReadAssembly(ms, parameters); + _assemblyCache.Add(cacheKey, assemblyDefinition); + return assemblyDefinition; + } + } + + private string FindFile(AssemblyNameReference name) + { + var fileName = _assemblyReferences.FirstOrDefault(r => Path.GetFileName(r) == name.Name + ".dll"); + if (fileName != null) + return fileName; + + // perhaps the type comes from an exe instead + fileName = _assemblyReferences.FirstOrDefault(r => Path.GetFileName(r) == name.Name + ".exe"); + if (fileName != null) + return fileName; + + //Unfortunately the current ICompiledAssembly API only provides direct references. + //It is very much possible that a postprocessor ends up investigating a type in a directly + //referenced assembly, that contains a field that is not in a directly referenced assembly. + //if we don't do anything special for that situation, it will fail to resolve. We should fix this + //in the ILPostProcessing API. As a workaround, we rely on the fact here that the indirect references + //are always located next to direct references, so we search in all directories of direct references we + //got passed, and if we find the file in there, we resolve to it. + foreach (var parentDir in _assemblyReferences.Select(Path.GetDirectoryName).Distinct()) + { + var candidate = Path.Combine(parentDir, name.Name + ".dll"); + if (File.Exists(candidate)) + return candidate; + } + + return null; + } + + static MemoryStream MemoryStreamFor(string fileName) + { + return Retry(10, TimeSpan.FromSeconds(1), () => + { + byte[] byteArray; + using (var fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) + { + byteArray = new byte[fs.Length]; + var readLength = fs.Read(byteArray, 0, (int)fs.Length); + if (readLength != fs.Length) + throw new InvalidOperationException("File read length is not full length of file."); + } + + return new MemoryStream(byteArray); + }); + } + + private static MemoryStream Retry(int retryCount, TimeSpan waitTime, Func func) + { + try + { + return func(); + } + catch (IOException) + { + if (retryCount == 0) + throw; + Console.WriteLine($"Caught IO Exception, trying {retryCount} more times"); + Thread.Sleep(waitTime); + return Retry(retryCount - 1, waitTime, func); + } + } + + public void AddAssemblyDefinitionBeingOperatedOn(AssemblyDefinition assemblyDefinition) + { + _selfAssembly = assemblyDefinition; + } + } +} diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpc.cs.meta b/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorAssemblyResolver.cs.meta similarity index 83% rename from com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpc.cs.meta rename to com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorAssemblyResolver.cs.meta index cbf4c05fa9..1a05af5112 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpc.cs.meta +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorAssemblyResolver.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 016911038fba70f429d3b98b432baad6 +guid: 2c247f4266b2864eb96e6a9ae6557d31 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporter.cs b/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporter.cs new file mode 100644 index 0000000000..c068842fa1 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporter.cs @@ -0,0 +1,22 @@ +using System.Linq; +using System.Reflection; +using Mono.Cecil; + +namespace MLAPI.Editor.CodeGen +{ + internal class PostProcessorReflectionImporter : DefaultReflectionImporter + { + private const string SystemPrivateCoreLib = "System.Private.CoreLib"; + private readonly AssemblyNameReference _correctCorlib; + + public PostProcessorReflectionImporter(ModuleDefinition module) : base(module) + { + _correctCorlib = module.AssemblyReferences.FirstOrDefault(a => a.Name == "mscorlib" || a.Name == "netstandard" || a.Name == SystemPrivateCoreLib); + } + + public override AssemblyNameReference ImportReference(AssemblyName reference) + { + return _correctCorlib != null && reference.Name == SystemPrivateCoreLib ? _correctCorlib : base.ImportReference(reference); + } + } +} diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnEveryone.cs.meta b/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporter.cs.meta similarity index 83% rename from com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnEveryone.cs.meta rename to com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporter.cs.meta index 4572197d35..8dca5f108d 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnEveryone.cs.meta +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporter.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: cf16e61d9b168104bbfa154c6149fc11 +guid: 484e8ad8c4dde382ea67036b32935ef1 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporterProvider.cs b/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporterProvider.cs new file mode 100644 index 0000000000..77d03c176c --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporterProvider.cs @@ -0,0 +1,12 @@ +using Mono.Cecil; + +namespace MLAPI.Editor.CodeGen +{ + internal class PostProcessorReflectionImporterProvider : IReflectionImporterProvider + { + public IReflectionImporter GetReflectionImporter(ModuleDefinition module) + { + return new PostProcessorReflectionImporter(module); + } + } +} diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporterProvider.cs.meta b/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporterProvider.cs.meta new file mode 100644 index 0000000000..12a58b89c2 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporterProvider.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f9273a5dad109ab0783891e36c983080 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/RuntimeAccessModifiersILPP.cs b/com.unity.multiplayer.mlapi/Editor/CodeGen/RuntimeAccessModifiersILPP.cs new file mode 100644 index 0000000000..90545a8b82 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/RuntimeAccessModifiersILPP.cs @@ -0,0 +1,111 @@ +using System.Collections.Generic; +using System.IO; +using Mono.Cecil; +using Mono.Cecil.Cil; +using Unity.CompilationPipeline.Common.Diagnostics; +using Unity.CompilationPipeline.Common.ILPostProcessing; + +namespace MLAPI.Editor.CodeGen +{ + internal sealed class RuntimeAccessModifiersILPP : ILPostProcessor + { + public override ILPostProcessor GetInstance() => this; + + public override bool WillProcess(ICompiledAssembly compiledAssembly) => compiledAssembly.Name == CodeGenHelpers.RuntimeAssemblyName; + + private readonly List _diagnostics = new List(); + + public override ILPostProcessResult Process(ICompiledAssembly compiledAssembly) + { + if (!WillProcess(compiledAssembly)) return null; + _diagnostics.Clear(); + + // read + var assemblyDefinition = CodeGenHelpers.AssemblyDefinitionFor(compiledAssembly); + if (assemblyDefinition == null) + { + _diagnostics.AddError($"Cannot read MLAPI Runtime assembly definition: {compiledAssembly.Name}"); + return null; + } + + // process + var mainModule = assemblyDefinition.MainModule; + if (mainModule != null) + { + foreach (var typeDefinition in mainModule.Types) + { + if (!typeDefinition.IsClass) continue; + + switch (typeDefinition.Name) + { + case nameof(NetworkingManager): + ProcessNetworkManager(typeDefinition); + break; + case nameof(NetworkedBehaviour): + ProcessNetworkBehaviour(typeDefinition); + break; + } + } + } + else _diagnostics.AddError($"Cannot get main module from MLAPI Runtime assembly definition: {compiledAssembly.Name}"); + + // write + var pe = new MemoryStream(); + var pdb = new MemoryStream(); + + var writerParameters = new WriterParameters + { + SymbolWriterProvider = new PortablePdbWriterProvider(), + SymbolStream = pdb, + WriteSymbols = true + }; + + assemblyDefinition.Write(pe, writerParameters); + + return new ILPostProcessResult(new InMemoryAssembly(pe.ToArray(), pdb.ToArray()), _diagnostics); + } + + private void ProcessNetworkManager(TypeDefinition typeDefinition) + { + foreach (var fieldDefinition in typeDefinition.Fields) + { + if (fieldDefinition.Name == nameof(NetworkingManager.__ntable)) + { + fieldDefinition.IsPublic = true; + } + } + } + + private void ProcessNetworkBehaviour(TypeDefinition typeDefinition) + { + foreach (var nestedType in typeDefinition.NestedTypes) + { + if (nestedType.Name == nameof(NetworkedBehaviour.NExec)) + { + nestedType.IsNestedFamily = true; + } + } + + foreach (var fieldDefinition in typeDefinition.Fields) + { + if (fieldDefinition.Name == nameof(NetworkedBehaviour.__nexec)) + { + fieldDefinition.IsFamily = true; + } + } + + foreach (var methodDefinition in typeDefinition.Methods) + { + switch (methodDefinition.Name) + { + case nameof(NetworkedBehaviour.BeginSendServerRpc): + case nameof(NetworkedBehaviour.EndSendServerRpc): + case nameof(NetworkedBehaviour.BeginSendClientRpc): + case nameof(NetworkedBehaviour.EndSendClientRpc): + methodDefinition.IsFamily = true; + break; + } + } + } + } +} diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/RuntimeAccessModifiersILPP.cs.meta b/com.unity.multiplayer.mlapi/Editor/CodeGen/RuntimeAccessModifiersILPP.cs.meta new file mode 100644 index 0000000000..8feb576995 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/RuntimeAccessModifiersILPP.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2c9f2f4b03d774432be69d4c2f53bd2d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/Unity.Multiplayer.MLAPI.Editor.CodeGen.asmdef b/com.unity.multiplayer.mlapi/Editor/CodeGen/Unity.Multiplayer.MLAPI.Editor.CodeGen.asmdef new file mode 100644 index 0000000000..494e02f72c --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/Unity.Multiplayer.MLAPI.Editor.CodeGen.asmdef @@ -0,0 +1,23 @@ +{ + "name": "Unity.Multiplayer.MLAPI.Editor.CodeGen", + "rootNamespace": "", + "references": [ + "Unity.Multiplayer.MLAPI.Runtime" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": true, + "overrideReferences": true, + "precompiledReferences": [ + "Mono.Cecil.dll", + "Mono.Cecil.Mdb.dll", + "Mono.Cecil.Pdb.dll", + "Mono.Cecil.Rocks.dll" + ], + "autoReferenced": false, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/Unity.Multiplayer.MLAPI.Editor.CodeGen.asmdef.meta b/com.unity.multiplayer.mlapi/Editor/CodeGen/Unity.Multiplayer.MLAPI.Editor.CodeGen.asmdef.meta new file mode 100644 index 0000000000..8a5c9cd195 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/Unity.Multiplayer.MLAPI.Editor.CodeGen.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fe4fa159f4a96442ba22af67ddf20c65 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash.meta b/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash.meta new file mode 100644 index 0000000000..f1fa98a705 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2c61e8fe9a68a486fbbc3128d233ded2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash/LICENSE b/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash/LICENSE new file mode 100644 index 0000000000..6b55f78fe5 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 2016 Sedat Kapanoglu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash/LICENSE.meta b/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash/LICENSE.meta new file mode 100644 index 0000000000..c6b28aa115 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash/LICENSE.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cf89ecbf6f9954c8ea6d0848b1e79d87 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash/XXHash.cs b/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash/XXHash.cs new file mode 100644 index 0000000000..14d8b04623 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash/XXHash.cs @@ -0,0 +1,291 @@ +// +// Copyright (c) 2015-2019 Sedat Kapanoglu +// MIT License (see LICENSE file for details) +// + +// @mfatihmar (Unity): Modified for Unity support + +using System.Runtime.CompilerServices; + +namespace MLAPI.Editor.CodeGen +{ + /// + /// XXHash implementation. + /// + internal static class XXHash + { + private const ulong prime64v1 = 11400714785074694791ul; + private const ulong prime64v2 = 14029467366897019727ul; + private const ulong prime64v3 = 1609587929392839161ul; + private const ulong prime64v4 = 9650029242287828579ul; + private const ulong prime64v5 = 2870177450012600261ul; + + private const uint prime32v1 = 2654435761u; + private const uint prime32v2 = 2246822519u; + private const uint prime32v3 = 3266489917u; + private const uint prime32v4 = 668265263u; + private const uint prime32v5 = 374761393u; + + /// + /// Generate a 32-bit xxHash value. + /// + /// Input buffer. + /// Input buffer length. + /// Optional seed. + /// 32-bit hash value. + public static unsafe uint Hash32(byte* buffer, int bufferLength, uint seed = 0) + { + const int stripeLength = 16; + + int len = bufferLength; + int remainingLen = len; + uint acc; + + byte* pInput = buffer; + if (len >= stripeLength) + { + uint acc1 = seed + prime32v1 + prime32v2; + uint acc2 = seed + prime32v2; + uint acc3 = seed; + uint acc4 = seed - prime32v1; + + do + { + acc = processStripe32(ref pInput, ref acc1, ref acc2, ref acc3, ref acc4); + remainingLen -= stripeLength; + } while (remainingLen >= stripeLength); + } + else + { + acc = seed + prime32v5; + } + + acc += (uint)len; + acc = processRemaining32(pInput, acc, remainingLen); + + return avalanche32(acc); + } + + /// + /// Generate a 64-bit xxHash value. + /// + /// Input buffer. + /// Input buffer length. + /// Optional seed. + /// Computed 64-bit hash value. + public static unsafe ulong Hash64(byte* buffer, int bufferLength, ulong seed = 0) + { + const int stripeLength = 32; + + int len = bufferLength; + int remainingLen = len; + ulong acc; + + byte* pInput = buffer; + if (len >= stripeLength) + { + ulong acc1 = seed + prime64v1 + prime64v2; + ulong acc2 = seed + prime64v2; + ulong acc3 = seed; + ulong acc4 = seed - prime64v1; + + do + { + acc = processStripe64(ref pInput, ref acc1, ref acc2, ref acc3, ref acc4); + remainingLen -= stripeLength; + } while (remainingLen >= stripeLength); + } + else + { + acc = seed + prime64v5; + } + + acc += (ulong)len; + acc = processRemaining64(pInput, acc, remainingLen); + + + return avalanche64(acc); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe ulong processStripe64( + ref byte* pInput, + ref ulong acc1, + ref ulong acc2, + ref ulong acc3, + ref ulong acc4) + { + processLane64(ref acc1, ref pInput); + processLane64(ref acc2, ref pInput); + processLane64(ref acc3, ref pInput); + processLane64(ref acc4, ref pInput); + + ulong acc = Bits.RotateLeft(acc1, 1) + + Bits.RotateLeft(acc2, 7) + + Bits.RotateLeft(acc3, 12) + + Bits.RotateLeft(acc4, 18); + + mergeAccumulator64(ref acc, acc1); + mergeAccumulator64(ref acc, acc2); + mergeAccumulator64(ref acc, acc3); + mergeAccumulator64(ref acc, acc4); + return acc; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void processLane64(ref ulong accn, ref byte* pInput) + { + ulong lane = *(ulong*)pInput; + accn = round64(accn, lane); + pInput += 8; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe ulong processRemaining64( + byte* pInput, + ulong acc, + int remainingLen) + { + for (ulong lane; remainingLen >= 8; remainingLen -= 8, pInput += 8) + { + lane = *(ulong*)pInput; + + acc ^= round64(0, lane); + acc = Bits.RotateLeft(acc, 27) * prime64v1; + acc += prime64v4; + } + + for (uint lane32; remainingLen >= 4; remainingLen -= 4, pInput += 4) + { + lane32 = *(uint*)pInput; + + acc ^= lane32 * prime64v1; + acc = Bits.RotateLeft(acc, 23) * prime64v2; + acc += prime64v3; + } + + for (byte lane8; remainingLen >= 1; remainingLen--, pInput++) + { + lane8 = *pInput; + acc ^= lane8 * prime64v5; + acc = Bits.RotateLeft(acc, 11) * prime64v1; + } + + return acc; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static ulong avalanche64(ulong acc) + { + acc ^= acc >> 33; + acc *= prime64v2; + acc ^= acc >> 29; + acc *= prime64v3; + acc ^= acc >> 32; + return acc; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static ulong round64(ulong accn, ulong lane) + { + accn += lane * prime64v2; + return Bits.RotateLeft(accn, 31) * prime64v1; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static void mergeAccumulator64(ref ulong acc, ulong accn) + { + acc ^= round64(0, accn); + acc *= prime64v1; + acc += prime64v4; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe uint processStripe32( + ref byte* pInput, + ref uint acc1, + ref uint acc2, + ref uint acc3, + ref uint acc4) + { + processLane32(ref pInput, ref acc1); + processLane32(ref pInput, ref acc2); + processLane32(ref pInput, ref acc3); + processLane32(ref pInput, ref acc4); + + return Bits.RotateLeft(acc1, 1) + + Bits.RotateLeft(acc2, 7) + + Bits.RotateLeft(acc3, 12) + + Bits.RotateLeft(acc4, 18); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void processLane32(ref byte* pInput, ref uint accn) + { + uint lane = *(uint*)pInput; + accn = round32(accn, lane); + pInput += 4; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe uint processRemaining32( + byte* pInput, + uint acc, + int remainingLen) + { + for (uint lane; remainingLen >= 4; remainingLen -= 4, pInput += 4) + { + lane = *(uint*)pInput; + acc += lane * prime32v3; + acc = Bits.RotateLeft(acc, 17) * prime32v4; + } + + for (byte lane; remainingLen >= 1; remainingLen--, pInput++) + { + lane = *pInput; + acc += lane * prime32v5; + acc = Bits.RotateLeft(acc, 11) * prime32v1; + } + + return acc; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static uint round32(uint accn, uint lane) + { + accn += lane * prime32v2; + accn = Bits.RotateLeft(accn, 13); + accn *= prime32v1; + return accn; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static uint avalanche32(uint acc) + { + acc ^= acc >> 15; + acc *= prime32v2; + acc ^= acc >> 13; + acc *= prime32v3; + acc ^= acc >> 16; + return acc; + } + + /// + /// Bit operations. + /// + private static class Bits + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ulong RotateLeft(ulong value, int bits) + { + return (value << bits) | (value >> (64 - bits)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint RotateLeft(uint value, int bits) + { + return (value << bits) | (value >> (32 - bits)); + } + } + } +} diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash/XXHash.cs.meta b/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash/XXHash.cs.meta new file mode 100644 index 0000000000..5c090bbab7 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/XXHash/XXHash.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b5aa7a49e9e694f148d810d34577546b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Editor/NetworkedAnimatorEditor.cs b/com.unity.multiplayer.mlapi/Editor/NetworkedAnimatorEditor.cs index 6cd7ea64b3..2477fcfe19 100644 --- a/com.unity.multiplayer.mlapi/Editor/NetworkedAnimatorEditor.cs +++ b/com.unity.multiplayer.mlapi/Editor/NetworkedAnimatorEditor.cs @@ -9,6 +9,8 @@ namespace UnityEditor [CanEditMultipleObjects] public class NetworkAnimatorEditor : Editor { + // TODO @mfatihmar (Unity): Re-implement this after `NetworkedAnimator` re-implementation + /* private NetworkedAnimator networkedAnimatorTarget; [NonSerialized] private bool initialized; @@ -93,5 +95,6 @@ void DrawControls() EditorGUILayout.LabelField("Param 4", networkedAnimatorTarget.param4); } } + */ } } diff --git a/com.unity.multiplayer.mlapi/Runtime/Configuration/MLAPIConstants.cs b/com.unity.multiplayer.mlapi/Runtime/Configuration/MLAPIConstants.cs index 3417d3b8fd..69902eace4 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Configuration/MLAPIConstants.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Configuration/MLAPIConstants.cs @@ -21,16 +21,12 @@ internal static class MLAPIConstants internal const byte MLAPI_TIME_SYNC = 11; internal const byte MLAPI_NETWORKED_VAR_DELTA = 12; internal const byte MLAPI_NETWORKED_VAR_UPDATE = 13; - internal const byte MLAPI_SERVER_RPC = 14; - internal const byte MLAPI_SERVER_RPC_REQUEST = 15; - internal const byte MLAPI_SERVER_RPC_RESPONSE = 16; - internal const byte MLAPI_CLIENT_RPC = 17; - internal const byte MLAPI_CLIENT_RPC_REQUEST = 18; - internal const byte MLAPI_CLIENT_RPC_RESPONSE = 19; internal const byte MLAPI_UNNAMED_MESSAGE = 20; internal const byte MLAPI_DESTROY_OBJECTS = 21; internal const byte MLAPI_NAMED_MESSAGE = 22; internal const byte MLAPI_SERVER_LOG = 23; + internal const byte MLAPI_SERVER_RPC = 30; + internal const byte MLAPI_CLIENT_RPC = 31; internal const byte INVALID = 32; internal static readonly string[] MESSAGE_NAMES = { @@ -48,12 +44,12 @@ internal static class MLAPIConstants "MLAPI_TIME_SYNC", "MLAPI_NETWORKED_VAR_DELTA", "MLAPI_NETWORKED_VAR_UPDATE", - "MLAPI_SERVER_RPC", - "MLAPI_SERVER_RPC_REQUEST", - "MLAPI_SERVER_RPC_RESPONSE", // 16 - "MLAPI_CLIENT_RPC", - "MLAPI_CLIENT_RPC_REQUEST", - "MLAPI_CLIENT_RPC_RESPONSE", + "", + "", + "", // 16 + "", + "", + "", "MLAPI_UNNAMED_MESSAGE", "MLAPI_DESTROY_OBJECTS", "MLAPI_NAMED_MESSAGE", @@ -64,8 +60,8 @@ internal static class MLAPIConstants "", "", "", - "", - "", + "MLAPI_SERVER_RPC", + "MLAPI_CLIENT_RPC", "INVALID" // 32 }; } diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/NetworkedBehaviour.cs b/com.unity.multiplayer.mlapi/Runtime/Core/NetworkedBehaviour.cs index b237d9f029..8b29593b15 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Core/NetworkedBehaviour.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Core/NetworkedBehaviour.cs @@ -5,31 +5,146 @@ using System.Reflection; using System.Linq; using System.IO; -using System.Text; using MLAPI.Configuration; -using MLAPI.Hashing; using MLAPI.Logging; using MLAPI.Messaging; using MLAPI.NetworkedVar; using MLAPI.Profiling; using MLAPI.Reflection; using MLAPI.Security; +using MLAPI.Serialization; using MLAPI.Serialization.Pooled; using MLAPI.Spawning; using BitStream = MLAPI.Serialization.BitStream; -using MLAPI.Serialization; using Unity.Profiling; +#if UNITY_EDITOR +using System.Runtime.CompilerServices; +[assembly: InternalsVisibleTo("Unity.Multiplayer.MLAPI.Editor.CodeGen")] +#endif // UNITY_EDITOR + namespace MLAPI { /// /// The base class to override to write networked code. Inherits MonoBehaviour /// - public abstract partial class NetworkedBehaviour : MonoBehaviour + public abstract class NetworkedBehaviour : MonoBehaviour { -#if DEVELOPMENT_BUILD || UNITY_EDITOR - static ProfilerMarker s_SendClientRPCPerformance = new ProfilerMarker("NetworkedBehaviour.SendClientRPCPerformance"); -#endif + // RuntimeAccessModifiersILPP will make this `protected` + internal enum NExec + { + None = 0, + Server = 1, + Client = 2 + } + +#pragma warning disable 414 + // RuntimeAccessModifiersILPP will make this `protected` + internal NExec __nexec = NExec.None; +#pragma warning restore 414 + + // RuntimeAccessModifiersILPP will make this `protected` + internal BitWriter BeginSendServerRpc(ServerRpcSendParams sendParams, bool isReliable) + { + // @mfatihmar (Unity) Begin: Temporary, placeholder implementation + var stream = new BitStream(); + var writer = new BitWriter(stream); + + writer.WriteBit(false); // Encrypted + writer.WriteBit(false); // Authenticated + writer.WriteBits(MLAPIConstants.MLAPI_SERVER_RPC, 6); // MessageType + writer.WriteUInt64Packed(NetworkId); // NetworkObjectId + writer.WriteUInt16Packed(GetBehaviourId()); // NetworkBehaviourId + + return writer; + // @mfatihmar (Unity) End: Temporary, placeholder implementation + } + + // RuntimeAccessModifiersILPP will make this `protected` + internal void EndSendServerRpc(BitWriter writer, ServerRpcSendParams sendParams, bool isReliable) + { + // @mfatihmar (Unity) Begin: Temporary, placeholder implementation + if (writer == null) return; + + var stream = (BitStream)writer.GetStream(); + if (stream != null) + { + stream.PadStream(); + + var networkManager = NetworkingManager.Singleton; + if (ReferenceEquals(networkManager, null)) return; + + var payload = new ArraySegment(stream.GetBuffer(), 0, (int)stream.Length); + // @mfatihmar (Unity) Begin: Temporary, inbound RPC queue will replace this workaround + if (networkManager.IsHost) + { + networkManager.__loopbackRpcQueue.Enqueue((payload, Time.realtimeSinceStartup)); + } + // @mfatihmar (Unity) End: Temporary, inbound RPC queue will replace this workaround + else + { + networkManager.NetworkConfig.NetworkTransport.Send(networkManager.ServerClientId, payload, "STDRPC"); + } + } + + writer.SetStream(null); + // @mfatihmar (Unity) End: Temporary, placeholder implementation + } + + // RuntimeAccessModifiersILPP will make this `protected` + internal BitWriter BeginSendClientRpc(ClientRpcSendParams sendParams, bool isReliable) + { + // @mfatihmar (Unity) Begin: Temporary, placeholder implementation + var stream = new BitStream(); + var writer = new BitWriter(stream); + + writer.WriteBit(false); // Encrypted + writer.WriteBit(false); // Authenticated + writer.WriteBits(MLAPIConstants.MLAPI_CLIENT_RPC, 6); // MessageType + writer.WriteUInt64Packed(NetworkId); // NetworkObjectId + writer.WriteUInt16Packed(GetBehaviourId()); // NetworkBehaviourId + + return writer; + // @mfatihmar (Unity) End: Temporary, placeholder implementation + } + + // RuntimeAccessModifiersILPP will make this `protected` + internal void EndSendClientRpc(BitWriter writer, ClientRpcSendParams sendParams, bool isReliable) + { + // @mfatihmar (Unity) Begin: Temporary, placeholder implementation + if (writer == null) return; + + var stream = (BitStream)writer.GetStream(); + if (stream != null) + { + stream.PadStream(); + + var networkManager = NetworkingManager.Singleton; + if (ReferenceEquals(networkManager, null)) return; + + if (sendParams.TargetClientIds == null) sendParams.TargetClientIds = networkManager.ConnectedClientsList.Select(client => client.ClientId).ToArray(); + foreach (var clientId in sendParams.TargetClientIds) + { + if (!NetworkedObject.observers.Contains(clientId)) continue; + + var payload = new ArraySegment(stream.GetBuffer(), 0, (int)stream.Length); + // @mfatihmar (Unity) Begin: Temporary, inbound RPC queue will replace this workaround + if (clientId == networkManager.ServerClientId && networkManager.IsHost) + { + networkManager.__loopbackRpcQueue.Enqueue((payload, Time.realtimeSinceStartup)); + } + // @mfatihmar (Unity) End: Temporary, inbound RPC queue will replace this workaround + else + { + networkManager.NetworkConfig.NetworkTransport.Send(clientId, payload, "STDRPC"); + } + } + } + + writer.SetStream(null); + // @mfatihmar (Unity) End: Temporary, placeholder implementation + } + /// /// Gets if the object is the the personal clients player object /// @@ -92,11 +207,6 @@ public abstract partial class NetworkedBehaviour : MonoBehaviour /// public bool IsOwnedByServer => NetworkedObject.IsOwnedByServer; /// - /// Contains the sender of the currently executing RPC. Useful for the convenience RPC methods - /// - protected ulong ExecutingRpcSender => executingRpcSender; - internal ulong executingRpcSender; - /// /// Gets the NetworkedObject that owns this NetworkedBehaviour instance /// [EditorBrowsable(EditorBrowsableState.Never)] @@ -175,9 +285,6 @@ public virtual void NetworkStart(Stream stream) internal void InternalNetworkStart() { - rpcDefinition = RpcTypeDefinition.Get(GetType()); - rpcDelegates = rpcDefinition.CreateTargetedDelegates(this); - InitializeVars(); } @@ -668,475 +775,6 @@ internal static void SetNetworkedVarData(List networkedVarList, S } #endregion - #region MESSAGING_SYSTEM - private static readonly StringBuilder methodInfoStringBuilder = new StringBuilder(); - private static readonly Dictionary methodInfoHashTable = new Dictionary(); - private RpcTypeDefinition rpcDefinition; - internal RpcDelegate[] rpcDelegates; - - internal static ulong HashMethodName(string name) - { - HashSize mode = NetworkingManager.Singleton.NetworkConfig.RpcHashSize; - - if (mode == HashSize.VarIntTwoBytes) - return name.GetStableHash16(); - if (mode == HashSize.VarIntFourBytes) - return name.GetStableHash32(); - if (mode == HashSize.VarIntEightBytes) - return name.GetStableHash64(); - - return 0; - } - - private ulong HashMethod(MethodInfo method) - { - if (methodInfoHashTable.ContainsKey(method)) - { - return methodInfoHashTable[method]; - } - - ulong hash = HashMethodName(GetHashableMethodSignature(method)); - methodInfoHashTable.Add(method, hash); - - return hash; - } - - internal static string GetHashableMethodSignature(MethodInfo method) - { - methodInfoStringBuilder.Length = 0; - methodInfoStringBuilder.Append(method.Name); - - ParameterInfo[] parameters = method.GetParameters(); - - for (int i = 0; i < parameters.Length; i++) - { - methodInfoStringBuilder.Append(parameters[i].ParameterType.Name); - } - - return methodInfoStringBuilder.ToString(); - } - - internal object OnRemoteServerRPC(ulong hash, ulong senderClientId, Stream stream) - { - if (!rpcDefinition.serverMethods.ContainsKey(hash)) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("ServerRPC request method not found"); - return null; - - } - - return InvokeServerRPCLocal(hash, senderClientId, stream); - } - - internal object OnRemoteClientRPC(ulong hash, ulong senderClientId, Stream stream) - { - if (!rpcDefinition.clientMethods.ContainsKey(hash)) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("ClientRPC request method not found"); - return null; - } - - return InvokeClientRPCLocal(hash, senderClientId, stream); - } - - private object InvokeServerRPCLocal(ulong hash, ulong senderClientId, Stream stream) - { - if (rpcDefinition.serverMethods.ContainsKey(hash)) - { - return rpcDefinition.serverMethods[hash].Invoke(this, senderClientId, stream); - } - - return null; - } - - private object InvokeClientRPCLocal(ulong hash, ulong senderClientId, Stream stream) - { - if (rpcDefinition.clientMethods.ContainsKey(hash)) - { - return rpcDefinition.clientMethods[hash].Invoke(this, senderClientId, stream); - } - - return null; - } - - //Technically boxed writes are not needed. But save LOC for the non performance sends. - internal void SendServerRPCBoxed(ulong hash, string channel, SecuritySendFlags security, params object[] parameters) - { - using (PooledBitStream stream = PooledBitStream.Get()) - { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - - for (int i = 0; i < parameters.Length; i++) - { - writer.WriteObjectPacked(parameters[i]); - } - - SendServerRPCPerformance(hash, stream, channel, security); - } - } - } - - internal RpcResponse SendServerRPCBoxedResponse(ulong hash, string channel, SecuritySendFlags security, params object[] parameters) - { - using (PooledBitStream stream = PooledBitStream.Get()) - { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - for (int i = 0; i < parameters.Length; i++) - { - writer.WriteObjectPacked(parameters[i]); - } - - return SendServerRPCPerformanceResponse(hash, stream, channel, security); - } - } - } - - internal void SendClientRPCBoxedToClient(ulong hash, ulong clientId, string channel, SecuritySendFlags security, params object[] parameters) - { - using (PooledBitStream stream = PooledBitStream.Get()) - { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - for (int i = 0; i < parameters.Length; i++) - { - writer.WriteObjectPacked(parameters[i]); - } - SendClientRPCPerformance(hash, clientId, stream, channel, security); - } - } - } - - internal RpcResponse SendClientRPCBoxedResponse(ulong hash, ulong clientId, string channel, SecuritySendFlags security, params object[] parameters) - { - using (PooledBitStream stream = PooledBitStream.Get()) - { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - for (int i = 0; i < parameters.Length; i++) - { - writer.WriteObjectPacked(parameters[i]); - } - - return SendClientRPCPerformanceResponse(hash, clientId, stream, channel, security); - } - } - } - - internal void SendClientRPCBoxed(ulong hash, List clientIds, string channel, SecuritySendFlags security, params object[] parameters) - { - using (PooledBitStream stream = PooledBitStream.Get()) - { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - for (int i = 0; i < parameters.Length; i++) - { - writer.WriteObjectPacked(parameters[i]); - } - SendClientRPCPerformance(hash, clientIds, stream, channel, security); - } - } - } - - internal void SendClientRPCBoxedToEveryoneExcept(ulong clientIdToIgnore, ulong hash, string channel, SecuritySendFlags security, params object[] parameters) - { - using (PooledBitStream stream = PooledBitStream.Get()) - { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - for (int i = 0; i < parameters.Length; i++) - { - writer.WriteObjectPacked(parameters[i]); - } - SendClientRPCPerformance(hash, stream, clientIdToIgnore, channel, security); - } - } - } - - internal void SendServerRPCPerformance(ulong hash, Stream messageStream, string channel, SecuritySendFlags security) - { - if (!IsClient && IsRunning) - { - //We are ONLY a server. - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("Only client and host can invoke ServerRPC"); - return; - } - - using (PooledBitStream stream = PooledBitStream.Get()) - { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - writer.WriteUInt64Packed(NetworkId); - writer.WriteUInt16Packed(NetworkedObject.GetOrderIndex(this)); - writer.WriteUInt64Packed(hash); - - stream.CopyFrom(messageStream); - - if (IsHost) - { - messageStream.Position = 0; - InvokeServerRPCLocal(hash, NetworkingManager.Singleton.LocalClientId, messageStream); - } - else - { - InternalMessageSender.Send(NetworkingManager.Singleton.ServerClientId, MLAPIConstants.MLAPI_SERVER_RPC, string.IsNullOrEmpty(channel) ? "MLAPI_DEFAULT_MESSAGE" : channel, stream, security); - ProfilerStatManager.rpcsSent.Record(); - } - } - } - } - - internal RpcResponse SendServerRPCPerformanceResponse(ulong hash, Stream messageStream, string channel, SecuritySendFlags security) - { - if (!IsClient && IsRunning) - { - //We are ONLY a server. - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("Only client and host can invoke ServerRPC"); - return null; - } - - ulong responseId = ResponseMessageManager.GenerateMessageId(); - - using (PooledBitStream stream = PooledBitStream.Get()) - { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - writer.WriteUInt64Packed(NetworkId); - writer.WriteUInt16Packed(NetworkedObject.GetOrderIndex(this)); - writer.WriteUInt64Packed(hash); - - if (!IsHost) writer.WriteUInt64Packed(responseId); - - stream.CopyFrom(messageStream); - - if (IsHost) - { - messageStream.Position = 0; - object result = InvokeServerRPCLocal(hash, NetworkingManager.Singleton.LocalClientId, messageStream); - - return new RpcResponse() - { - Id = responseId, - IsDone = true, - IsSuccessful = true, - Result = result, - Type = typeof(T), - ClientId = NetworkingManager.Singleton.ServerClientId - }; - } - else - { - RpcResponse response = new RpcResponse() - { - Id = responseId, - IsDone = false, - IsSuccessful = false, - Type = typeof(T), - ClientId = NetworkingManager.Singleton.ServerClientId - }; - - ResponseMessageManager.Add(response.Id, response); - - InternalMessageSender.Send(NetworkingManager.Singleton.ServerClientId, MLAPIConstants.MLAPI_SERVER_RPC_REQUEST, string.IsNullOrEmpty(channel) ? "MLAPI_DEFAULT_MESSAGE" : channel, stream, security); - ProfilerStatManager.rpcsSent.Record(); - - return response; - } - } - } - } - - internal void SendClientRPCPerformance(ulong hash, List clientIds, Stream messageStream, string channel, SecuritySendFlags security) - { - if (!IsServer && IsRunning) - { - //We are NOT a server. - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("Only servers and hosts can invoke ClientRPC"); - return; - } - - using (PooledBitStream stream = PooledBitStream.Get()) - { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - writer.WriteUInt64Packed(NetworkId); - writer.WriteUInt16Packed(NetworkedObject.GetOrderIndex(this)); - writer.WriteUInt64Packed(hash); - - stream.CopyFrom(messageStream); - - if (IsHost) - { - if (this.NetworkedObject.observers.Contains(NetworkingManager.Singleton.LocalClientId)) - { - messageStream.Position = 0; - InvokeClientRPCLocal(hash, NetworkingManager.Singleton.LocalClientId, messageStream); - } - else - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Developer) NetworkLog.LogWarning("Silently suppressed ClientRPC because a connected client was not an observer"); - } - } - - InternalMessageSender.Send(MLAPIConstants.MLAPI_CLIENT_RPC, string.IsNullOrEmpty(channel) ? "MLAPI_DEFAULT_MESSAGE" : channel, clientIds, stream, security); - ProfilerStatManager.rpcsSent.Record(clientIds?.Count ?? NetworkingManager.Singleton.ConnectedClientsList.Count); - } - } - } - - internal void SendClientRPCPerformance(ulong hash, Stream messageStream, ulong clientIdToIgnore, string channel, SecuritySendFlags security) - { -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_SendClientRPCPerformance.Begin(); -#endif - if (!IsServer && IsRunning) - { - //We are NOT a server. - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("Only servers and hosts can invoke ClientRPC"); - return; - } - - using (PooledBitStream stream = PooledBitStream.Get()) - { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - writer.WriteUInt64Packed(NetworkId); - writer.WriteUInt16Packed(NetworkedObject.GetOrderIndex(this)); - writer.WriteUInt64Packed(hash); - - stream.CopyFrom(messageStream); - - - if (IsHost && NetworkingManager.Singleton.LocalClientId != clientIdToIgnore) - { - if (this.NetworkedObject.observers.Contains(NetworkingManager.Singleton.LocalClientId)) - { - messageStream.Position = 0; - InvokeClientRPCLocal(hash, NetworkingManager.Singleton.LocalClientId, messageStream); - } - else - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Developer) NetworkLog.LogWarning("Silently suppressed ClientRPC because a connected client was not an observer"); - } - } - - InternalMessageSender.Send(MLAPIConstants.MLAPI_CLIENT_RPC, string.IsNullOrEmpty(channel) ? "MLAPI_DEFAULT_MESSAGE" : channel, clientIdToIgnore, stream, security); - ProfilerStatManager.rpcsSent.Record(NetworkingManager.Singleton.ConnectedClientsList.Count - 1); - } - } - -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_SendClientRPCPerformance.End(); -#endif - } - - internal void SendClientRPCPerformance(ulong hash, ulong clientId, Stream messageStream, string channel, SecuritySendFlags security) - { - if (!IsServer && IsRunning) - { - //We are NOT a server. - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("Only servers and hosts can invoke ClientRPC"); - return; - } - - if (!this.NetworkedObject.observers.Contains(clientId)) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("Cannot send ClientRPC to client without visibility to the object"); - return; - } - - using (PooledBitStream stream = PooledBitStream.Get()) - { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - writer.WriteUInt64Packed(NetworkId); - writer.WriteUInt16Packed(NetworkedObject.GetOrderIndex(this)); - writer.WriteUInt64Packed(hash); - - stream.CopyFrom(messageStream); - - if (IsHost && clientId == NetworkingManager.Singleton.LocalClientId) - { - messageStream.Position = 0; - InvokeClientRPCLocal(hash, NetworkingManager.Singleton.LocalClientId, messageStream); - } - else - { - InternalMessageSender.Send(clientId, MLAPIConstants.MLAPI_CLIENT_RPC, string.IsNullOrEmpty(channel) ? "MLAPI_DEFAULT_MESSAGE" : channel, stream, security); - ProfilerStatManager.rpcsSent.Record(); - } - } - } - } - - internal RpcResponse SendClientRPCPerformanceResponse(ulong hash, ulong clientId, Stream messageStream, string channel, SecuritySendFlags security) - { - if (!IsServer && IsRunning) - { - //We are NOT a server. - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("Only servers and hosts can invoke ClientRPC"); - return null; - } - - if (!this.NetworkedObject.observers.Contains(clientId)) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("Cannot send ClientRPC to client without visibility to the object"); - return null; - } - - ulong responseId = ResponseMessageManager.GenerateMessageId(); - - using (PooledBitStream stream = PooledBitStream.Get()) - { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - writer.WriteUInt64Packed(NetworkId); - writer.WriteUInt16Packed(NetworkedObject.GetOrderIndex(this)); - writer.WriteUInt64Packed(hash); - - if (!(IsHost && clientId == NetworkingManager.Singleton.LocalClientId)) writer.WriteUInt64Packed(responseId); - - stream.CopyFrom(messageStream); - - if (IsHost && clientId == NetworkingManager.Singleton.LocalClientId) - { - messageStream.Position = 0; - object result = InvokeClientRPCLocal(hash, NetworkingManager.Singleton.LocalClientId, messageStream); - - return new RpcResponse() - { - Id = responseId, - IsDone = true, - IsSuccessful = true, - Result = result, - Type = typeof(T), - ClientId = clientId - }; - } - else - { - RpcResponse response = new RpcResponse() - { - Id = responseId, - IsDone = false, - IsSuccessful = false, - Type = typeof(T), - ClientId = clientId - }; - - ResponseMessageManager.Add(response.Id, response); - - InternalMessageSender.Send(clientId, MLAPIConstants.MLAPI_CLIENT_RPC_REQUEST, string.IsNullOrEmpty(channel) ? "MLAPI_DEFAULT_MESSAGE" : channel, stream, security); - ProfilerStatManager.rpcsSent.Record(); - - return response; - } - } - } - } - #endregion - /// /// Gets the local instance of a object with a given NetworkId /// diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/NetworkingManager.cs b/com.unity.multiplayer.mlapi/Runtime/Core/NetworkingManager.cs index 4a742ef2d5..1c6397ee42 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Core/NetworkingManager.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Core/NetworkingManager.cs @@ -36,6 +36,13 @@ namespace MLAPI [AddComponentMenu("MLAPI/NetworkingManager", -100)] public class NetworkingManager : MonoBehaviour { + // RuntimeAccessModifiersILPP will make this `public` + internal static readonly Dictionary> __ntable = new Dictionary>(); + + // @mfatihmar (Unity) Begin: Temporary, inbound RPC queue will replace this workaround + internal readonly Queue<(ArraySegment payload, float receiveTime)> __loopbackRpcQueue = new Queue<(ArraySegment payload, float receiveTime)>(); + // @mfatihmar (Unity) End: Temporary, inbound RPC queue will replace this workaround + #if DEVELOPMENT_BUILD || UNITY_EDITOR static ProfilerMarker s_EventTick = new ProfilerMarker("Event"); static ProfilerMarker s_ReceiveTick = new ProfilerMarker("Receive"); @@ -346,7 +353,6 @@ private void Init(bool server) ConnectedClients.Clear(); ConnectedClientsList.Clear(); - ResponseMessageManager.Clear(); SpawnManager.SpawnedObjects.Clear(); SpawnManager.SpawnedObjectsList.Clear(); SpawnManager.releasedNetworkObjectIds.Clear(); @@ -356,6 +362,10 @@ private void Init(bool server) NetworkSceneManager.sceneNameToIndex.Clear(); NetworkSceneManager.sceneSwitchProgresses.Clear(); + // @mfatihmar (Unity) Begin: Temporary, inbound RPC queue will replace this workaround + __loopbackRpcQueue.Clear(); + // @mfatihmar (Unity) End: Temporary, inbound RPC queue will replace this workaround + if (NetworkConfig.NetworkTransport == null) { if (NetworkLog.CurrentLogLevel <= LogLevel.Error) NetworkLog.LogError("No transport has been selected!"); @@ -640,6 +650,9 @@ private void Shutdown() IsListening = false; IsServer = false; IsClient = false; + // @mfatihmar (Unity) Begin: Temporary, inbound RPC queue will replace this workaround + __loopbackRpcQueue.Clear(); + // @mfatihmar (Unity) End: Temporary, inbound RPC queue will replace this workaround NetworkConfig.NetworkTransport.OnTransportEvent -= HandleRawTransportPoll; SpawnManager.DestroyNonSceneObjects(); SpawnManager.ServerResetShudownStateForSceneObjects(); @@ -663,6 +676,18 @@ private void Update() #if DEVELOPMENT_BUILD || UNITY_EDITOR s_ReceiveTick.Begin(); #endif + + // @mfatihmar (Unity) Begin: Temporary, inbound RPC queue will replace this workaround + if (IsHost) + { + while (__loopbackRpcQueue.Count > 0) + { + var (payload, receiveTime) = __loopbackRpcQueue.Dequeue(); + HandleRawTransportPoll(NetEventType.Data, ServerClientId, "STDRPC", payload, receiveTime); + } + } + // @mfatihmar (Unity) End: Temporary, inbound RPC queue will replace this workaround + NetworkProfiler.StartTick(TickType.Receive); NetEventType eventType; int processedEvents = 0; @@ -698,7 +723,6 @@ private void Update() { eventOvershootCounter += ((NetworkTime - lastEventTickTime) - (1f / NetworkConfig.EventTickrate)); LagCompensationManager.AddFrames(); - ResponseMessageManager.CheckTimeouts(); } if (NetworkConfig.EnableNetworkedVar) @@ -1025,40 +1049,6 @@ internal void HandleIncomingData(ulong clientId, string channelName, ArraySegmen ReceiveTime = receiveTime }); break; - case MLAPIConstants.MLAPI_SERVER_RPC: - if (IsServer) InternalMessageHandler.HandleServerRPC(clientId, messageStream); - break; - case MLAPIConstants.MLAPI_SERVER_RPC_REQUEST: - if (IsServer) InternalMessageHandler.HandleServerRPCRequest(clientId, messageStream, channelName, security); - break; - case MLAPIConstants.MLAPI_SERVER_RPC_RESPONSE: - if (IsClient) InternalMessageHandler.HandleServerRPCResponse(clientId, messageStream); - break; - case MLAPIConstants.MLAPI_CLIENT_RPC: - if (IsClient) InternalMessageHandler.HandleClientRPC(clientId, messageStream, BufferCallback, new PreBufferPreset() - { - AllowBuffer = allowBuffer, - ChannelName = channelName, - ClientId = clientId, - Data = data, - MessageType = messageType, - ReceiveTime = receiveTime - }); - break; - case MLAPIConstants.MLAPI_CLIENT_RPC_REQUEST: - if (IsClient) InternalMessageHandler.HandleClientRPCRequest(clientId, messageStream, channelName, security, BufferCallback, new PreBufferPreset() - { - AllowBuffer = allowBuffer, - ChannelName = channelName, - ClientId = clientId, - Data = data, - MessageType = messageType, - ReceiveTime = receiveTime - }); - break; - case MLAPIConstants.MLAPI_CLIENT_RPC_RESPONSE: - if (IsServer) InternalMessageHandler.HandleClientRPCResponse(clientId, messageStream); - break; case MLAPIConstants.MLAPI_UNNAMED_MESSAGE: InternalMessageHandler.HandleUnnamedMessage(clientId, messageStream); break; @@ -1082,6 +1072,55 @@ internal void HandleIncomingData(ulong clientId, string channelName, ArraySegmen case MLAPIConstants.MLAPI_SERVER_LOG: if (IsServer && NetworkConfig.EnableNetworkLogs) InternalMessageHandler.HandleNetworkLog(clientId, messageStream); break; + // @mfatihmar (Unity) Begin: Temporary, placeholder implementation + case MLAPIConstants.MLAPI_SERVER_RPC: + if (IsServer) + { + using (var reader = PooledBitReader.Get(messageStream)) + { + var networkObjectId = reader.ReadUInt64Packed(); + var networkBehaviourId = reader.ReadUInt16Packed(); + var networkMethodId = reader.ReadUInt32Packed(); + + if (__ntable.ContainsKey(networkMethodId)) + { + if (!SpawnManager.SpawnedObjects.ContainsKey(networkObjectId)) return; + var networkObject = SpawnManager.SpawnedObjects[networkObjectId]; + + // only the OwnerClient can execute ServerRPC from client to server + if (networkObject.OwnerClientId != clientId) return; + + var networkBehaviour = networkObject.GetBehaviourAtOrderIndex(networkBehaviourId); + if (ReferenceEquals(networkBehaviour, null)) return; + + __ntable[networkMethodId](networkBehaviour, reader, clientId); + } + } + } + break; + case MLAPIConstants.MLAPI_CLIENT_RPC: + if (IsClient) + { + using (var reader = PooledBitReader.Get(messageStream)) + { + var networkObjectId = reader.ReadUInt64Packed(); + var networkBehaviourId = reader.ReadUInt16Packed(); + var networkMethodId = reader.ReadUInt32Packed(); + + if (__ntable.ContainsKey(networkMethodId)) + { + if (!SpawnManager.SpawnedObjects.ContainsKey(networkObjectId)) return; + var networkObject = SpawnManager.SpawnedObjects[networkObjectId]; + + var networkBehaviour = networkObject.GetBehaviourAtOrderIndex(networkBehaviourId); + if (ReferenceEquals(networkBehaviour, null)) return; + + __ntable[networkMethodId](networkBehaviour, reader, clientId); + } + } + } + break; + // @mfatihmar (Unity) End: Temporary, placeholder implementation default: if (NetworkLog.CurrentLogLevel <= LogLevel.Error) NetworkLog.LogError("Read unrecognized messageType " + messageType); break; diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpc.cs b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpc.cs deleted file mode 100644 index 1d48749a35..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpc.cs +++ /dev/null @@ -1,341 +0,0 @@ -using System.Collections.Generic; -using MLAPI.Security; -using UnityEngine; - -namespace MLAPI -{ - public abstract partial class NetworkedBehaviour : MonoBehaviour - { - #pragma warning disable 1591 - public void InvokeClientRpc(string methodName, List clientIds, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public void InvokeClientRpc(string methodName, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - - public void InvokeClientRpc(RpcMethod method, List clientIds, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), clientIds, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - #pragma warning restore 1591 - } -} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnClient.cs b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnClient.cs deleted file mode 100644 index 84c472957d..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnClient.cs +++ /dev/null @@ -1,671 +0,0 @@ -using MLAPI.Messaging; -using MLAPI.Security; -using UnityEngine; - -namespace MLAPI -{ - public abstract partial class NetworkedBehaviour : MonoBehaviour - { - #pragma warning disable 1591 - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public void InvokeClientRpcOnClient(RpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - - public void InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public RpcResponse InvokeClientRpcOnClient(ResponseRpcMethod method, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - - public RpcResponse InvokeClientRpcOnClient(string methodName, ulong clientId, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), clientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - #pragma warning restore 1591 - } -} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnEveryone.cs b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnEveryone.cs deleted file mode 100644 index 0e2f3cacb4..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnEveryone.cs +++ /dev/null @@ -1,340 +0,0 @@ -using MLAPI.Security; -using UnityEngine; - -namespace MLAPI -{ - public abstract partial class NetworkedBehaviour : MonoBehaviour - { - #pragma warning disable 1591 - public void InvokeClientRpcOnEveryone(RpcMethod method, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security); - } - - public void InvokeClientRpcOnEveryone(string methodName, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public void InvokeClientRpcOnEveryone(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethod(method.Method), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - - public void InvokeClientRpcOnEveryone(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxed(HashMethodName(methodName), null, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - #pragma warning restore 1591 - } -} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnEveryoneExcept.cs b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnEveryoneExcept.cs deleted file mode 100644 index b4c460006a..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnEveryoneExcept.cs +++ /dev/null @@ -1,340 +0,0 @@ -using MLAPI.Security; -using UnityEngine; - -namespace MLAPI -{ - public abstract partial class NetworkedBehaviour : MonoBehaviour - { - #pragma warning disable 1591 - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public void InvokeClientRpcOnEveryoneExcept(RpcMethod method, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToEveryoneExcept(clientIdToIgnore, HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - #pragma warning restore 1591 - } -} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnOwner.cs b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnOwner.cs deleted file mode 100644 index c53bb38a25..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnOwner.cs +++ /dev/null @@ -1,671 +0,0 @@ -using MLAPI.Messaging; -using MLAPI.Security; -using UnityEngine; - -namespace MLAPI -{ - public abstract partial class NetworkedBehaviour : MonoBehaviour - { - #pragma warning disable 1591 - public void InvokeClientRpcOnOwner(RpcMethod method, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security); - } - - public void InvokeClientRpcOnOwner(string methodName, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public void InvokeClientRpcOnOwner(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - - public void InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCBoxedToClient(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public RpcResponse InvokeClientRpcOnOwner(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethod(method.Method), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - - public RpcResponse InvokeClientRpcOnOwner(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendClientRPCBoxedResponse(HashMethodName(methodName), OwnerClientId, channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - #pragma warning restore 1591 - } -} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnOwner.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnOwner.cs.meta deleted file mode 100644 index b6cdd329d6..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedClientRpc.InvokeClientRpcOnOwner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8e3c92e9888ab5348b90c6d2e7150a54 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedServerRpc.cs b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedServerRpc.cs deleted file mode 100644 index 055628850c..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedServerRpc.cs +++ /dev/null @@ -1,671 +0,0 @@ -using MLAPI.Messaging; -using MLAPI.Security; -using UnityEngine; - -namespace MLAPI -{ - public abstract partial class NetworkedBehaviour : MonoBehaviour - { - #pragma warning disable 1591 - public void InvokeServerRpc(RpcMethod method, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security); - } - - public void InvokeServerRpc(string methodName, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security); - } - - public RpcResponse InvokeServerRpc(string methodName, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1); - } - - public void InvokeServerRpc(string methodName, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31); - } - - public void InvokeServerRpc(RpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - - public RpcResponse InvokeServerRpc(ResponseRpcMethod method, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethod(method.Method), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - - public void InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCBoxed(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - - public RpcResponse InvokeServerRpc(string methodName, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - return SendServerRPCBoxedResponse(HashMethodName(methodName), channel, security, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32); - } - #pragma warning restore 1591 - } -} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedServerRpc.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedServerRpc.cs.meta deleted file mode 100644 index 06b37dbaea..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.BoxedServerRpc.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ea6093232328d404c895a1cd75a2395d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.PerformanceClientRpc.cs b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.PerformanceClientRpc.cs deleted file mode 100644 index 8e1ab3bf10..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.PerformanceClientRpc.cs +++ /dev/null @@ -1,135 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.IO; -using MLAPI.Messaging; -using MLAPI.Security; -using UnityEngine; - -namespace MLAPI -{ - public abstract partial class NetworkedBehaviour : MonoBehaviour - { - #pragma warning disable 1591 - [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("Use InvokeClientRpcPerformance instead")] - public void InvokeClientRpc(RpcDelegate method, List clientIds, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethod(method.Method), clientIds, stream, channel, security); - } - - [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("Use InvokeClientRpcOnOwnerPerformance instead")] - public void InvokeClientRpcOnOwner(RpcDelegate method, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethod(method.Method), OwnerClientId, stream, channel, security); - } - - [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("Use InvokeClientRpcOnClientPerformance instead")] - public void InvokeClientRpcOnClient(RpcDelegate method, ulong clientId, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethod(method.Method), clientId, stream, channel, security); - } - - [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("Use InvokeClientRpcOnEveryonePerformance instead")] - public void InvokeClientRpcOnEveryone(RpcDelegate method, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethod(method.Method), null, stream, channel, security); - } - - [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("Use InvokeClientRpcOnEveryoneExceptPerformance instead")] - public void InvokeClientRpcOnEveryoneExcept(RpcDelegate method, ulong clientIdToIgnore, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethod(method.Method), stream, clientIdToIgnore, channel, security); - } - - [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("Use InvokeClientRpcPerformance instead")] - public void InvokeClientRpc(string methodName, List clientIds, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethodName(methodName), clientIds, stream, channel, security); - } - - [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("Use InvokeClientRpcOnClientPerformance instead")] - public void InvokeClientRpcOnClient(string methodName, ulong clientId, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethodName(methodName), clientId, stream, channel, security); - } - - [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("Use InvokeClientRpcOnOwnerPerformance instead")] - public void InvokeClientRpcOnOwner(string methodName, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethodName(methodName), OwnerClientId, stream, channel, security); - } - - [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("Use InvokeClientRpcOnEveryonePerformance instead")] - public void InvokeClientRpcOnEveryone(string methodName, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethodName(methodName), null, stream, channel, security); - } - - [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("Use InvokeClientRpcOnEveryoneExceptPerformance instead")] - public void InvokeClientRpcOnEveryoneExcept(string methodName, ulong clientIdToIgnore, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethodName(methodName), stream, clientIdToIgnore, channel, security); - } - - public void InvokeClientRpcPerformance(RpcDelegate method, List clientIds, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethod(method.Method), clientIds, stream, channel, security); - } - - public void InvokeClientRpcOnOwnerPerformance(RpcDelegate method, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethod(method.Method), OwnerClientId, stream, channel, security); - } - - public void InvokeClientRpcOnClientPerformance(RpcDelegate method, ulong clientId, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethod(method.Method), clientId, stream, channel, security); - } - - public void InvokeClientRpcOnEveryonePerformance(RpcDelegate method, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethod(method.Method), null, stream, channel, security); - } - - public void InvokeClientRpcOnEveryoneExceptPerformance(RpcDelegate method, ulong clientIdToIgnore, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethod(method.Method), stream, clientIdToIgnore, channel, security); - } - - public void InvokeClientRpcPerformance(string methodName, List clientIds, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethodName(methodName), clientIds, stream, channel, security); - } - - public void InvokeClientRpcOnClientPerformance(string methodName, ulong clientId, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethodName(methodName), clientId, stream, channel, security); - } - - public void InvokeClientRpcOnOwnerPerformance(string methodName, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethodName(methodName), OwnerClientId, stream, channel, security); - } - - public void InvokeClientRpcOnEveryonePerformance(string methodName, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethodName(methodName), null, stream, channel, security); - } - - public void InvokeClientRpcOnEveryoneExceptPerformance(string methodName, ulong clientIdToIgnore, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendClientRPCPerformance(HashMethodName(methodName), stream, clientIdToIgnore, channel, security); - } - #pragma warning restore 1591 - } -} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.PerformanceClientRpc.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.PerformanceClientRpc.cs.meta deleted file mode 100644 index d4706e2b47..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.PerformanceClientRpc.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9eff22dd4b431e94d906d7be2888f4af -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.PerformanceServerRpc.cs b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.PerformanceServerRpc.cs deleted file mode 100644 index 20d39e0534..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.PerformanceServerRpc.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.ComponentModel; -using System.IO; -using MLAPI.Messaging; -using MLAPI.Security; -using UnityEngine; - -namespace MLAPI -{ - public abstract partial class NetworkedBehaviour : MonoBehaviour - { - #pragma warning disable 1591 - [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("Use InvokeServerRpcPerformance instead")] - public void InvokeServerRpc(RpcDelegate method, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCPerformance(HashMethod(method.Method), stream, channel, security); - } - - [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("Use InvokeServerRpcPerformance instead")] - public void InvokeServerRpc(string methodName, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCPerformance(HashMethodName(methodName), stream, channel, security); - } - - public void InvokeServerRpcPerformance(RpcDelegate method, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCPerformance(HashMethod(method.Method), stream, channel, security); - } - - public void InvokeServerRpcPerformance(string methodName, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) - { - SendServerRPCPerformance(HashMethodName(methodName), stream, channel, security); - } - #pragma warning restore 1591 - } -} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.PerformanceServerRpc.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.PerformanceServerRpc.cs.meta deleted file mode 100644 index ed9abdf204..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.PerformanceServerRpc.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b98833981715ca04cbb4b50ace6f31a7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.RpcDelegates.cs b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.RpcDelegates.cs deleted file mode 100644 index 3c8aec3213..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.RpcDelegates.cs +++ /dev/null @@ -1,140 +0,0 @@ -using UnityEngine; - -namespace MLAPI -{ - public abstract partial class NetworkedBehaviour : MonoBehaviour - { - /// - public delegate void RpcMethod(); - /// - public delegate void RpcMethod(T1 t1); - /// - public delegate void RpcMethod(T1 t1, T2 t2); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31); - /// - public delegate void RpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32); - /// - public delegate TResult ResponseRpcMethod(); - /// - public delegate TResult ResponseRpcMethod(T1 t1); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31); - /// - public delegate TResult ResponseRpcMethod(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22, T23 t23, T24 t24, T25 t25, T26 t26, T27 t27, T28 t28, T29 t29, T30 t30, T31 t31, T32 t32); - } -} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.RpcDelegates.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.RpcDelegates.cs.meta deleted file mode 100644 index 39d899b38c..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Core/RPCMethods/NetworkedBehaviour.RpcDelegates.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d7fe0ad1dcb018645b00b330cf59dacc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/ClientRPCAttribute.cs b/com.unity.multiplayer.mlapi/Runtime/Messaging/ClientRPCAttribute.cs deleted file mode 100644 index 46efb98593..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/ClientRPCAttribute.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace MLAPI.Messaging -{ - /// - /// Attribute used on methods to me marked as ClientRPC - /// ClientRPC methods can be requested from the server and will execute on a client - /// Remember that a host is a server and a client - /// - [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)] - public class ClientRPCAttribute : RPCAttribute - { - } -} diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/ClientRPCAttribute.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Messaging/ClientRPCAttribute.cs.meta deleted file mode 100644 index eca87cae6a..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/ClientRPCAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c2ed81fc320e1664f90f4bb854ce1bca -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/CustomMessageManager.cs b/com.unity.multiplayer.mlapi/Runtime/Messaging/CustomMessageManager.cs index 0149262ec1..f8d77b1b5c 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/CustomMessageManager.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Messaging/CustomMessageManager.cs @@ -161,7 +161,19 @@ public static void UnregisterNamedMessageHandler(string name) /// The security settings to apply to the message public static void SendNamedMessage(string name, ulong clientId, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) { - ulong hash = NetworkedBehaviour.HashMethodName(name); + ulong hash = 0; + switch (NetworkingManager.Singleton.NetworkConfig.RpcHashSize) + { + case HashSize.VarIntTwoBytes: + hash = name.GetStableHash16(); + break; + case HashSize.VarIntFourBytes: + hash = name.GetStableHash32(); + break; + case HashSize.VarIntEightBytes: + hash = name.GetStableHash64(); + break; + } using (PooledBitStream messageStream = PooledBitStream.Get()) { @@ -186,7 +198,19 @@ public static void SendNamedMessage(string name, ulong clientId, Stream stream, /// The security settings to apply to the message public static void SendNamedMessage(string name, List clientIds, Stream stream, string channel = null, SecuritySendFlags security = SecuritySendFlags.None) { - ulong hash = NetworkedBehaviour.HashMethodName(name); + ulong hash = 0; + switch (NetworkingManager.Singleton.NetworkConfig.RpcHashSize) + { + case HashSize.VarIntTwoBytes: + hash = name.GetStableHash16(); + break; + case HashSize.VarIntFourBytes: + hash = name.GetStableHash32(); + break; + case HashSize.VarIntEightBytes: + hash = name.GetStableHash64(); + break; + } using (PooledBitStream messageStream = PooledBitStream.Get()) { diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/InternalMessageHandler.cs b/com.unity.multiplayer.mlapi/Runtime/Messaging/InternalMessageHandler.cs index 922ef00efc..cb1c4d4703 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/InternalMessageHandler.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Messaging/InternalMessageHandler.cs @@ -42,18 +42,6 @@ internal static class InternalMessageHandler new ProfilerMarker("InternalMessageHandler.HandleNetworkedVarDelta"); static ProfilerMarker s_HandleNetworkedVarUpdate = new ProfilerMarker("InternalMessageHandler.HandleNetworkedVarUpdate"); - static ProfilerMarker s_HandleServerRPC = - new ProfilerMarker("InternalMessageHandler.HandleServerRPC"); - static ProfilerMarker s_HandleServerRPCRequest = - new ProfilerMarker("InternalMessageHandler.HandleServerRPCRequest"); - static ProfilerMarker s_HandleServerRPCResponse = - new ProfilerMarker("InternalMessageHandler.HandleServerRPCResponse"); - static ProfilerMarker s_HandleClientRPC = - new ProfilerMarker("InternalMessageHandler.HandleClientRPC"); - static ProfilerMarker s_HandleClientRPCRequest = - new ProfilerMarker("InternalMessageHandler.HandleClientRPCRequest"); - static ProfilerMarker s_HandleClientRPCResponse = - new ProfilerMarker("InternalMessageHandler.HandleClientRPCResponse"); static ProfilerMarker s_HandleUnnamedMessage = new ProfilerMarker("InternalMessageHandler.HandleUnnamedMessage"); static ProfilerMarker s_HandleNamedMessage = @@ -687,238 +675,6 @@ internal static void HandleNetworkedVarUpdate(ulong clientId, Stream stream, Act #endif } - internal static void HandleServerRPC(ulong clientId, Stream stream) - { - ProfilerStatManager.rpcsRcvd.Record(); -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_HandleServerRPC.Begin(); -#endif - using (PooledBitReader reader = PooledBitReader.Get(stream)) - { - ulong networkId = reader.ReadUInt64Packed(); - ushort behaviourId = reader.ReadUInt16Packed(); - ulong hash = reader.ReadUInt64Packed(); - - if (SpawnManager.SpawnedObjects.ContainsKey(networkId)) - { - NetworkedBehaviour behaviour = SpawnManager.SpawnedObjects[networkId].GetBehaviourAtOrderIndex(behaviourId); - - if (behaviour == null) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("ServerRPC message received for a non-existent behaviour. NetworkId: " + networkId + ", behaviourIndex: " + behaviourId); - } - else - { - behaviour.OnRemoteServerRPC(hash, clientId, stream); - } - } - else if (NetworkingManager.Singleton.IsServer || !NetworkingManager.Singleton.NetworkConfig.EnableMessageBuffering) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("ServerRPC message received for a non-existent object with id: " + networkId + ". This message is lost."); - } - } -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_HandleServerRPC.End(); -#endif - } - - internal static void HandleServerRPCRequest(ulong clientId, Stream stream, string channelName, SecuritySendFlags security) - { -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_HandleServerRPCRequest.Begin(); -#endif - using (PooledBitReader reader = PooledBitReader.Get(stream)) - { - ulong networkId = reader.ReadUInt64Packed(); - ushort behaviourId = reader.ReadUInt16Packed(); - ulong hash = reader.ReadUInt64Packed(); - ulong responseId = reader.ReadUInt64Packed(); - - if (SpawnManager.SpawnedObjects.ContainsKey(networkId)) - { - NetworkedBehaviour behaviour = SpawnManager.SpawnedObjects[networkId].GetBehaviourAtOrderIndex(behaviourId); - - if (behaviour == null) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("ServerRPCRequest message received for a non-existent behaviour. NetworkId: " + networkId + ", behaviourIndex: " + behaviourId); - } - else - { - object result = behaviour.OnRemoteServerRPC(hash, clientId, stream); - - using (PooledBitStream responseStream = PooledBitStream.Get()) - { - using (PooledBitWriter responseWriter = PooledBitWriter.Get(responseStream)) - { - responseWriter.WriteUInt64Packed(responseId); - responseWriter.WriteObjectPacked(result); - } - - InternalMessageSender.Send(clientId, MLAPIConstants.MLAPI_SERVER_RPC_RESPONSE, channelName, responseStream, security); - ProfilerStatManager.rpcsSent.Record(); - } - } - } - else - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("ServerRPCRequest message received for a non-existent object with id: " + networkId + ". This message is lost."); - } - } -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_HandleServerRPCRequest.End(); -#endif - } - - internal static void HandleServerRPCResponse(ulong clientId, Stream stream) - { - ProfilerStatManager.rpcsRcvd.Record(); -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_HandleServerRPCResponse.Begin(); -#endif - using (PooledBitReader reader = PooledBitReader.Get(stream)) - { - ulong responseId = reader.ReadUInt64Packed(); - - if (ResponseMessageManager.ContainsKey(responseId)) - { - RpcResponseBase responseBase = ResponseMessageManager.GetByKey(responseId); - - ResponseMessageManager.Remove(responseId); - - responseBase.IsDone = true; - responseBase.Result = reader.ReadObjectPacked(responseBase.Type); - responseBase.IsSuccessful = true; - } - else - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("ServerRPCResponse message received for a non-existent responseId: " + responseId + ". This response is lost."); - } - } -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_HandleServerRPCResponse.End(); -#endif - } - - internal static void HandleClientRPC(ulong clientId, Stream stream, Action bufferCallback, PreBufferPreset bufferPreset) - { - ProfilerStatManager.rpcsRcvd.Record(); -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_HandleClientRPC.Begin(); -#endif - using (PooledBitReader reader = PooledBitReader.Get(stream)) - { - ulong networkId = reader.ReadUInt64Packed(); - ushort behaviourId = reader.ReadUInt16Packed(); - ulong hash = reader.ReadUInt64Packed(); - - if (SpawnManager.SpawnedObjects.ContainsKey(networkId)) - { - NetworkedBehaviour behaviour = SpawnManager.SpawnedObjects[networkId].GetBehaviourAtOrderIndex(behaviourId); - - if (behaviour == null) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("ClientRPC message received for a non-existent behaviour. NetworkId: " + networkId + ", behaviourIndex: " + behaviourId); - } - else - { - behaviour.OnRemoteClientRPC(hash, clientId, stream); - } - } - else if (NetworkingManager.Singleton.IsServer || !NetworkingManager.Singleton.NetworkConfig.EnableMessageBuffering) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("ClientRPC message received for a non-existent object with id: " + networkId + ". This message is lost."); - } - else - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("ClientRPC message received for a non-existent object with id: " + networkId + ". This message will be buffered and might be recovered."); - bufferCallback(networkId, bufferPreset); - } - } -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_HandleClientRPC.End(); -#endif - } - - internal static void HandleClientRPCRequest(ulong clientId, Stream stream, string channelName, SecuritySendFlags security, Action bufferCallback, PreBufferPreset bufferPreset) - { -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_HandleClientRPCRequest.Begin(); -#endif - using (PooledBitReader reader = PooledBitReader.Get(stream)) - { - ulong networkId = reader.ReadUInt64Packed(); - ushort behaviourId = reader.ReadUInt16Packed(); - ulong hash = reader.ReadUInt64Packed(); - ulong responseId = reader.ReadUInt64Packed(); - - if (SpawnManager.SpawnedObjects.ContainsKey(networkId)) - { - NetworkedBehaviour behaviour = SpawnManager.SpawnedObjects[networkId].GetBehaviourAtOrderIndex(behaviourId); - - if (behaviour == null) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("ClientRPCRequest message received for a non-existent behaviour. NetworkId: " + networkId + ", behaviourIndex: " + behaviourId); - } - else - { - object result = behaviour.OnRemoteClientRPC(hash, clientId, stream); - - using (PooledBitStream responseStream = PooledBitStream.Get()) - { - using (PooledBitWriter responseWriter = PooledBitWriter.Get(responseStream)) - { - responseWriter.WriteUInt64Packed(responseId); - responseWriter.WriteObjectPacked(result); - } - - InternalMessageSender.Send(clientId, MLAPIConstants.MLAPI_CLIENT_RPC_RESPONSE, channelName, responseStream, security); - ProfilerStatManager.rpcsSent.Record(); - } - } - } - else if (NetworkingManager.Singleton.IsServer || !NetworkingManager.Singleton.NetworkConfig.EnableMessageBuffering) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("ClientRPCRequest message received for a non-existent object with id: " + networkId + ". This message is lost."); - } - else - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("ClientRPCRequest message received for a non-existent object with id: " + networkId + ". This message will be buffered and might be recovered."); - bufferCallback(networkId, bufferPreset); - } - } -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_HandleClientRPCRequest.End(); -#endif - } - - internal static void HandleClientRPCResponse(ulong clientId, Stream stream) - { - ProfilerStatManager.rpcsRcvd.Record(); -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_HandleClientRPCResponse.Begin(); -#endif - using (PooledBitReader reader = PooledBitReader.Get(stream)) - { - ulong responseId = reader.ReadUInt64Packed(); - - if (ResponseMessageManager.ContainsKey(responseId)) - { - RpcResponseBase responseBase = ResponseMessageManager.GetByKey(responseId); - - if (responseBase.ClientId != clientId) return; - - ResponseMessageManager.Remove(responseId); - - responseBase.IsDone = true; - responseBase.Result = reader.ReadObjectPacked(responseBase.Type); - responseBase.IsSuccessful = true; - } - } -#if DEVELOPMENT_BUILD || UNITY_EDITOR - s_HandleClientRPCResponse.End(); -#endif - } - internal static void HandleUnnamedMessage(ulong clientId, Stream stream) { ProfilerStatManager.unnamedMessage.Record(); diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/RPCAttribute.cs b/com.unity.multiplayer.mlapi/Runtime/Messaging/RPCAttribute.cs deleted file mode 100644 index 9e77b19429..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/RPCAttribute.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace MLAPI.Messaging -{ - /// - /// Generic supertype of Client and Server RPC Attributes. Do not use directly. - /// - public abstract class RPCAttribute : Attribute - { - } -} diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/ReflectionMethod.cs b/com.unity.multiplayer.mlapi/Runtime/Messaging/ReflectionMethod.cs deleted file mode 100644 index 9c546115e7..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/ReflectionMethod.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using System.IO; -using System.Reflection; -using MLAPI.Logging; -using MLAPI.Serialization; -using MLAPI.Serialization.Pooled; - -namespace MLAPI.Messaging -{ - internal class ReflectionMethod - { - internal readonly MethodInfo method; - internal readonly bool useDelegate; - internal readonly bool serverTarget; - private readonly bool requireOwnership; - private readonly int index; - private readonly Type[] parameterTypes; - private readonly object[] parameterRefs; - - internal static ReflectionMethod Create(MethodInfo method, ParameterInfo[] parameters, int index) - { - RPCAttribute[] attributes = (RPCAttribute[])method.GetCustomAttributes(typeof(RPCAttribute), true); - - if (attributes.Length == 0) - return null; - - if (attributes.Length > 1) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("Having more than one ServerRPC or ClientRPC attribute per method is not supported."); - } - - if (method.ReturnType != typeof(void) && !SerializationManager.IsTypeSupported(method.ReturnType)) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Error) NetworkLog.LogWarning("Invalid return type of RPC. Has to be either void or RpcResponse with a serializable type"); - } - - return new ReflectionMethod(method, parameters, attributes[0], index); - } - - internal ReflectionMethod(MethodInfo method, ParameterInfo[] parameters, RPCAttribute attribute, int index) - { - this.method = method; - this.index = index; - - if (attribute is ServerRPCAttribute serverRpcAttribute) - { - requireOwnership = serverRpcAttribute.RequireOwnership; - serverTarget = true; - } - else - { - requireOwnership = false; - serverTarget = false; - } - - if (parameters.Length == 2 && method.ReturnType == typeof(void) && parameters[0].ParameterType == typeof(ulong) && parameters[1].ParameterType == typeof(Stream)) - { - useDelegate = true; - } - else - { - useDelegate = false; - - parameterTypes = new Type[parameters.Length]; - parameterRefs = new object[parameters.Length]; - - for (int i = 0; i < parameters.Length; i++) - { - parameterTypes[i] = parameters[i].ParameterType; - } - } - } - - internal object Invoke(NetworkedBehaviour target, ulong senderClientId, Stream stream) - { - if (requireOwnership == true && senderClientId != target.OwnerClientId) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("Only owner can invoke ServerRPC that is marked to require ownership"); - - return null; - } - - target.executingRpcSender = senderClientId; - - if (stream.Position == 0) - { - if (useDelegate) - { - return InvokeDelegate(target, senderClientId, stream); - } - else - { - return InvokeReflected(target, stream); - } - } - else - { - // Create a new stream so that the stream they get ONLY contains user data and not MLAPI headers - using (PooledBitStream userStream = PooledBitStream.Get()) - { - userStream.CopyUnreadFrom(stream); - userStream.Position = 0; - - if (useDelegate) - { - return InvokeDelegate(target, senderClientId, userStream); - } - else - { - return InvokeReflected(target, userStream); - } - } - } - } - - private object InvokeReflected(NetworkedBehaviour instance, Stream stream) - { - using (PooledBitReader reader = PooledBitReader.Get(stream)) - { - for (int i = 0; i < parameterTypes.Length; i++) - { - parameterRefs[i] = reader.ReadObjectPacked(parameterTypes[i]); - } - - return method.Invoke(instance, parameterRefs); - } - } - - private object InvokeDelegate(NetworkedBehaviour target, ulong senderClientId, Stream stream) - { - target.rpcDelegates[index](senderClientId, stream); - - return null; - } - } -} diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/ReflectionMethod.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Messaging/ReflectionMethod.cs.meta deleted file mode 100644 index 94a57e8f2b..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/ReflectionMethod.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4414780fa5da00a4bbb4bd1306532fa1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/ResponseMessageManager.cs b/com.unity.multiplayer.mlapi/Runtime/Messaging/ResponseMessageManager.cs deleted file mode 100644 index 0a59392dbf..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/ResponseMessageManager.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -namespace MLAPI.Messaging -{ - internal static class ResponseMessageManager - { - private static readonly Dictionary pendingResponses = new Dictionary(); - private static readonly SortedList responseAdded = new SortedList(); - - private static ulong messageIdCounter; - - internal static ulong GenerateMessageId() - { - return messageIdCounter++; - } - - internal static void CheckTimeouts() - { - while (responseAdded.Count > 0 && Time.unscaledTime - responseAdded[responseAdded.Keys[0]] > pendingResponses[responseAdded.Keys[0]].Timeout) - { - ulong key = responseAdded.Keys[0]; - - RpcResponseBase response = pendingResponses[key]; - response.IsDone = true; - response.IsSuccessful = false; - - Remove(key); - } - } - - internal static void Clear() - { - pendingResponses.Clear(); - responseAdded.Clear(); - } - - internal static void Add(ulong key, RpcResponseBase value) - { - pendingResponses.Add(key, value); - responseAdded.Add(key, Time.unscaledTime); - } - - internal static void Remove(ulong key) - { - pendingResponses.Remove(key); - responseAdded.Remove(key); - } - - internal static bool ContainsKey(ulong key) - { - return pendingResponses.ContainsKey(key); - } - - internal static RpcResponseBase GetByKey(ulong key) - { - return pendingResponses[key]; - } - } -} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/ResponseMessageManager.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Messaging/ResponseMessageManager.cs.meta deleted file mode 100644 index d67bc6a739..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/ResponseMessageManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 728f733633a82d84f98bfe2672b3edcc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcAttributes.cs b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcAttributes.cs new file mode 100644 index 0000000000..c95424bc77 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcAttributes.cs @@ -0,0 +1,34 @@ +using System; + +namespace MLAPI.Messaging +{ + /// + /// Represents the common base class for Rpc attributes. + /// + public abstract class RpcAttribute : Attribute + { + public bool IsReliable = true; + } + + /// + /// Marks a method as ServerRpc. + /// A ServerRpc marked method will be fired by a client but executed on the server. + /// + [AttributeUsage(AttributeTargets.Method)] + public class ServerRpcAttribute : RpcAttribute + { + /// + /// Whether or not the ServerRpc should only be run if executed by the owner of the object + /// + public bool RequireOwnership = true; + } + + /// + /// Marks a method as ClientRpc. + /// A ClientRpc marked method will be fired by the server but executed on clients. + /// + [AttributeUsage(AttributeTargets.Method)] + public class ClientRpcAttribute : RpcAttribute + { + } +} diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/RPCAttribute.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcAttributes.cs.meta similarity index 100% rename from com.unity.multiplayer.mlapi/Runtime/Messaging/RPCAttribute.cs.meta rename to com.unity.multiplayer.mlapi/Runtime/Messaging/RpcAttributes.cs.meta diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcDelegate.cs b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcDelegate.cs deleted file mode 100644 index 15cb413a38..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcDelegate.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.IO; - -namespace MLAPI.Messaging -{ - /// - /// Delegate definition for performance RPC's. - /// - public delegate void RpcDelegate(ulong clientId, Stream stream); -} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcDelegate.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcDelegate.cs.meta deleted file mode 100644 index 187222d52f..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcDelegate.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 39da0cf73bbc7a64ebc6cdefcb832948 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcParams.cs b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcParams.cs new file mode 100644 index 0000000000..1370cafa80 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcParams.cs @@ -0,0 +1,32 @@ +namespace MLAPI.Messaging +{ + public struct ServerRpcSendParams + { + } + + public struct ServerRpcReceiveParams + { + public ulong SenderClientId; + } + + public struct ServerRpcParams + { + public ServerRpcSendParams Send; + public ServerRpcReceiveParams Receive; + } + + public struct ClientRpcSendParams + { + public ulong[] TargetClientIds; + } + + public struct ClientRpcReceiveParams + { + } + + public struct ClientRpcParams + { + public ClientRpcSendParams Send; + public ClientRpcReceiveParams Receive; + } +} diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcParams.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcParams.cs.meta new file mode 100644 index 0000000000..a22c768e6f --- /dev/null +++ b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcParams.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: accabc5a65e8a45dda9207fac37d1b24 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcResponse.cs b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcResponse.cs deleted file mode 100644 index dd468220ee..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace MLAPI.Messaging -{ - /// - /// The RpcResponse class exposed by the API. Represents a network Request/Response operation with a result - /// - /// The result type - public class RpcResponse : RpcResponseBase - { - /// - /// Gets the return value of the operation - /// - public T Value { get; private set; } - - internal override object Result - { - set => Value = (T) value; - } - } -} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcResponse.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcResponse.cs.meta deleted file mode 100644 index 821ff7c707..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcResponse.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c051c7a3b3aabb4448404d0a01673936 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcResponseBase.cs b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcResponseBase.cs deleted file mode 100644 index dc25ec1f45..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcResponseBase.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; - -namespace MLAPI.Messaging -{ - /// - /// Abstract base class for RpcResponse - /// - public abstract class RpcResponseBase - { - /// - /// Unique ID for the Rpc Request and Response pair - /// - public ulong Id { get; internal set; } - /// - /// Whether or not the operation is done. This does not mean it was successful. Check IsSuccessful for that - /// This will be true both when the operation was successful and when a timeout occured - /// - public bool IsDone { get; internal set; } - /// - /// Whether or not a valid result was received - /// - public bool IsSuccessful { get; set; } - /// - /// The clientId which the Request/Response was done wit - /// - public ulong ClientId { get; internal set; } - /// - /// The amount of time to wait for the operation to complete - /// - public float Timeout { get; set; } = 10f; - internal abstract object Result { set; } - internal Type Type { get; set; } - } -} \ No newline at end of file diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcResponseBase.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcResponseBase.cs.meta deleted file mode 100644 index e310e1a788..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcResponseBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3c8895ef9a6cf2947bf09c284db36a65 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcTypeDefinition.cs b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcTypeDefinition.cs deleted file mode 100644 index ed501d3387..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcTypeDefinition.cs +++ /dev/null @@ -1,124 +0,0 @@ -using MLAPI.Logging; -using System; -using System.Collections.Generic; -using System.Reflection; - -namespace MLAPI.Messaging -{ - internal class RpcTypeDefinition - { - private static readonly Dictionary typeLookup = new Dictionary(); - private static readonly Dictionary hashResults = new Dictionary(); - - public static RpcTypeDefinition Get(Type type) - { - if (typeLookup.ContainsKey(type)) - { - return typeLookup[type]; - } - else - { - RpcTypeDefinition info = new RpcTypeDefinition(type); - typeLookup.Add(type, info); - - return info; - } - } - - private static ulong HashMethodNameAndValidate(string name) - { - ulong hash = NetworkedBehaviour.HashMethodName(name); - - if (hashResults.ContainsKey(hash)) - { - string hashResult = hashResults[hash]; - - if (hashResult != name) - { - if (NetworkLog.CurrentLogLevel <= LogLevel.Error) NetworkLog.LogError("Hash collision detected for RPC method. The method \"" + name + "\" collides with the method \"" + hashResult + "\". This can be solved by increasing the amount of bytes to use for hashing in the NetworkConfig or changing the name of one of the conflicting methods."); - } - } - else - { - hashResults.Add(hash, name); - } - - return hash; - } - - private static List GetAllMethods(Type type, Type limitType) - { - List list = new List(); - - while (type != null && type != limitType) - { - list.AddRange(type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); - - type = type.BaseType; - } - - return list; - } - - public readonly Dictionary serverMethods = new Dictionary(); - public readonly Dictionary clientMethods = new Dictionary(); - private readonly ReflectionMethod[] delegateMethods; - - private RpcTypeDefinition(Type type) - { - List delegateMethodsList = new List(); - List methods = GetAllMethods(type, typeof(NetworkedBehaviour)); - - for (int i = 0; i < methods.Count; i++) - { - MethodInfo method = methods[i]; - ParameterInfo[] parameters = method.GetParameters(); - ReflectionMethod rpcMethod = ReflectionMethod.Create(method, parameters, delegateMethodsList.Count); - - if (rpcMethod == null) - continue; - - Dictionary lookupTarget = rpcMethod.serverTarget ? serverMethods : clientMethods; - - ulong nameHash = HashMethodNameAndValidate(method.Name); - - if (!lookupTarget.ContainsKey(nameHash)) - { - lookupTarget.Add(nameHash, rpcMethod); - } - - if (parameters.Length > 0) - { - ulong signatureHash = HashMethodNameAndValidate(NetworkedBehaviour.GetHashableMethodSignature(method)); - - if (!lookupTarget.ContainsKey(signatureHash)) - { - lookupTarget.Add(signatureHash, rpcMethod); - } - } - - if (rpcMethod.useDelegate) - { - delegateMethodsList.Add(rpcMethod); - } - } - - delegateMethods = delegateMethodsList.ToArray(); - } - - internal RpcDelegate[] CreateTargetedDelegates(NetworkedBehaviour target) - { - if (delegateMethods.Length == 0) - return null; - - RpcDelegate[] rpcDelegates = new RpcDelegate[delegateMethods.Length]; - - for (int i = 0; i < delegateMethods.Length; i++) - { - rpcDelegates[i] = (RpcDelegate) Delegate.CreateDelegate(typeof(RpcDelegate), target, delegateMethods[i].method.Name); - } - - return rpcDelegates; - } - } -} diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcTypeDefinition.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcTypeDefinition.cs.meta deleted file mode 100644 index a39a256549..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/RpcTypeDefinition.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e27c8fc7521a9564686ab0d60f3ed81c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/ServerRPCAttribute.cs b/com.unity.multiplayer.mlapi/Runtime/Messaging/ServerRPCAttribute.cs deleted file mode 100644 index 657f4965a2..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/ServerRPCAttribute.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace MLAPI.Messaging -{ - /// - /// Attribute used on methods to me marked as ServerRPC - /// ServerRPC methods can be requested from a client and will execute on the server - /// Remember that a host is a server and a client - /// - [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)] - public class ServerRPCAttribute : RPCAttribute - { - /// - /// Whether or not the ServerRPC should only be run if executed by the owner of the object - /// - public bool RequireOwnership = true; - } -} diff --git a/com.unity.multiplayer.mlapi/Runtime/Messaging/ServerRPCAttribute.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Messaging/ServerRPCAttribute.cs.meta deleted file mode 100644 index 78ac089a34..0000000000 --- a/com.unity.multiplayer.mlapi/Runtime/Messaging/ServerRPCAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0f770517760a4f54da8aac5ff2a4a911 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/Runtime/Profiling/ProfilerStatManager.cs b/com.unity.multiplayer.mlapi/Runtime/Profiling/ProfilerStatManager.cs index ecb77fd889..7bb7877e80 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Profiling/ProfilerStatManager.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Profiling/ProfilerStatManager.cs @@ -3,7 +3,7 @@ namespace MLAPI.Profiling { public static class ProfilerStatManager - { + { public static List allStats = new List(); public static ProfilerStat bytesRcvd = new ProfilerStat("Bytes Rcvd"); @@ -11,9 +11,6 @@ public static class ProfilerStatManager public static ProfilerStat rcvTickRate = new ProfilerStat("Rcv Tick Rate"); - public static ProfilerStat rpcsRcvd = new ProfilerStat("RPCs Rcvd"); - public static ProfilerStat rpcsSent = new ProfilerStat("RPCs Sent"); - public static ProfilerStat networkVarsRcvd = new ProfilerStat("Network Vars Rcvd"); public static ProfilerStat namedMessage = new ProfilerStat("Named Message"); diff --git a/com.unity.multiplayer.mlapi/Runtime/Prototyping/NetworkedAnimator.cs b/com.unity.multiplayer.mlapi/Runtime/Prototyping/NetworkedAnimator.cs index bf7c07b7b1..c70a8a6f59 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Prototyping/NetworkedAnimator.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Prototyping/NetworkedAnimator.cs @@ -14,6 +14,8 @@ namespace MLAPI.Prototyping [AddComponentMenu("MLAPI/NetworkedAnimator")] public class NetworkedAnimator : NetworkedBehaviour { + // TODO @mfatihmar (Unity): Re-implement without bugs and unexpected stream read/write behaviours + /* /// /// Is proximity enabled /// @@ -237,7 +239,7 @@ private void SetRecvTrackingParam(string p, int i) if (i == 5) param5 = p; } - [ServerRPC] + [ServerRpc] private void SubmitAnimMsg(ulong clientId, Stream stream) { // usually transitions will be triggered by parameters, if not, play anims directly. @@ -260,7 +262,7 @@ private void SubmitAnimMsg(ulong clientId, Stream stream) } } - [ClientRPC] + [ClientRpc] private void ApplyAnimMsg(ulong clientId, Stream stream) { using (PooledBitReader reader = PooledBitReader.Get(stream)) @@ -275,7 +277,7 @@ private void ApplyAnimMsg(ulong clientId, Stream stream) } } - [ServerRPC] + [ServerRpc] private void SubmitAnimParamMsg(ulong clientId, Stream stream) { if (EnableProximity) @@ -294,13 +296,13 @@ private void SubmitAnimParamMsg(ulong clientId, Stream stream) } } - [ClientRPC] + [ClientRpc] private void ApplyAnimParamMsg(ulong clientId, Stream stream) { ReadParameters(stream, true); } - [ServerRPC] + [ServerRpc] private void SubmitAnimTriggerMsg(ulong clientId, Stream stream) { if (EnableProximity) @@ -319,7 +321,7 @@ private void SubmitAnimTriggerMsg(ulong clientId, Stream stream) } } - [ClientRPC] + [ClientRpc] private void ApplyAnimTriggerMsg(ulong clientId, Stream stream) { using (PooledBitReader reader = PooledBitReader.Get(stream)) @@ -453,5 +455,6 @@ public void SetTrigger(int hash) } } } + */ } } diff --git a/com.unity.multiplayer.mlapi/Runtime/Prototyping/NetworkedNavMeshAgent.cs b/com.unity.multiplayer.mlapi/Runtime/Prototyping/NetworkedNavMeshAgent.cs index 38a0ba66f1..bbb88562fa 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Prototyping/NetworkedNavMeshAgent.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Prototyping/NetworkedNavMeshAgent.cs @@ -1,8 +1,6 @@ using System.Collections.Generic; -using System.IO; using MLAPI.Connection; using MLAPI.Messaging; -using MLAPI.Serialization.Pooled; using UnityEngine; using UnityEngine.AI; @@ -15,24 +13,29 @@ namespace MLAPI.Prototyping public class NetworkedNavMeshAgent : NetworkedBehaviour { private NavMeshAgent agent; + /// /// Is proximity enabled /// public bool EnableProximity = false; + /// /// The proximity range /// public float ProximityRange = 50f; + /// /// The delay in seconds between corrections /// public float CorrectionDelay = 3f; + //TODO rephrase. /// /// The percentage to lerp on corrections /// [Tooltip("Everytime a correction packet is received. This is the percentage (between 0 & 1) that we will move towards the goal.")] public float DriftCorrectionPercentage = 0.1f; + /// /// Should we warp on destination change /// @@ -45,6 +48,7 @@ private void Awake() private Vector3 lastDestination = Vector3.zero; private float lastCorrectionTime = 0f; + private void Update() { if (!IsOwner) @@ -53,127 +57,64 @@ private void Update() if (agent.destination != lastDestination) { lastDestination = agent.destination; - using (PooledBitStream stream = PooledBitStream.Get()) + if (!EnableProximity) { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) + OnNavMeshStateUpdateClientRpc(agent.destination, agent.velocity, transform.position); + } + else + { + List proximityClients = new List(); + foreach (KeyValuePair client in NetworkingManager.Singleton.ConnectedClients) { - - writer.WriteSinglePacked(agent.destination.x); - writer.WriteSinglePacked(agent.destination.y); - writer.WriteSinglePacked(agent.destination.z); - - writer.WriteSinglePacked(agent.velocity.x); - writer.WriteSinglePacked(agent.velocity.y); - writer.WriteSinglePacked(agent.velocity.z); - - writer.WriteSinglePacked(transform.position.x); - writer.WriteSinglePacked(transform.position.y); - writer.WriteSinglePacked(transform.position.z); - - - if (!EnableProximity) - { - InvokeClientRpcOnEveryonePerformance(OnNavMeshStateUpdate, stream); - } - else - { - List proximityClients = new List(); - foreach (KeyValuePair client in NetworkingManager.Singleton.ConnectedClients) - { - if (client.Value.PlayerObject == null || Vector3.Distance(client.Value.PlayerObject.transform.position, transform.position) <= ProximityRange) - proximityClients.Add(client.Key); - } - InvokeClientRpcPerformance(OnNavMeshStateUpdate, proximityClients, stream); - } + if (client.Value.PlayerObject == null || Vector3.Distance(client.Value.PlayerObject.transform.position, transform.position) <= ProximityRange) + proximityClients.Add(client.Key); } + + OnNavMeshStateUpdateClientRpc(agent.destination, agent.velocity, transform.position, + new ClientRpcParams {Send = new ClientRpcSendParams {TargetClientIds = proximityClients.ToArray()}}); } } if (NetworkingManager.Singleton.NetworkTime - lastCorrectionTime >= CorrectionDelay) { - using (PooledBitStream stream = PooledBitStream.Get()) + if (!EnableProximity) { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) + OnNavMeshCorrectionUpdateClientRpc(agent.velocity, transform.position); + } + else + { + List proximityClients = new List(); + foreach (KeyValuePair client in NetworkingManager.Singleton.ConnectedClients) { - writer.WriteSinglePacked(agent.velocity.x); - writer.WriteSinglePacked(agent.velocity.y); - writer.WriteSinglePacked(agent.velocity.z); - - writer.WriteSinglePacked(transform.position.x); - writer.WriteSinglePacked(transform.position.y); - writer.WriteSinglePacked(transform.position.z); - - - if (!EnableProximity) - { - InvokeClientRpcOnEveryonePerformance(OnNavMeshCorrectionUpdate, stream); - } - else - { - List proximityClients = new List(); - foreach (KeyValuePair client in NetworkingManager.Singleton.ConnectedClients) - { - if (client.Value.PlayerObject == null || Vector3.Distance(client.Value.PlayerObject.transform.position, transform.position) <= ProximityRange) - proximityClients.Add(client.Key); - } - InvokeClientRpcPerformance(OnNavMeshCorrectionUpdate, proximityClients, stream); - } + if (client.Value.PlayerObject == null || Vector3.Distance(client.Value.PlayerObject.transform.position, transform.position) <= ProximityRange) + proximityClients.Add(client.Key); } + + OnNavMeshCorrectionUpdateClientRpc(agent.velocity, transform.position, + new ClientRpcParams {Send = new ClientRpcSendParams {TargetClientIds = proximityClients.ToArray()}}); } + lastCorrectionTime = NetworkingManager.Singleton.NetworkTime; } } - [ClientRPC] - private void OnNavMeshStateUpdate(ulong clientId, Stream stream) + [ClientRpc] + private void OnNavMeshStateUpdateClientRpc(Vector3 destination, Vector3 velocity, Vector3 position, ClientRpcParams rpcParams = default) { - using (PooledBitReader reader = PooledBitReader.Get(stream)) - { - float xDestination = reader.ReadSinglePacked(); - float yDestination = reader.ReadSinglePacked(); - float zDestination = reader.ReadSinglePacked(); - - float xVel = reader.ReadSinglePacked(); - float yVel = reader.ReadSinglePacked(); - float zVel = reader.ReadSinglePacked(); - - float xPos = reader.ReadSinglePacked(); - float yPos = reader.ReadSinglePacked(); - float zPos = reader.ReadSinglePacked(); - - Vector3 destination = new Vector3(xDestination, yDestination, zDestination); - Vector3 velocity = new Vector3(xVel, yVel, zVel); - Vector3 position = new Vector3(xPos, yPos, zPos); - - if (WarpOnDestinationChange) - agent.Warp(position); - else - agent.Warp(Vector3.Lerp(transform.position, position, DriftCorrectionPercentage)); + if (WarpOnDestinationChange) + agent.Warp(position); + else + agent.Warp(Vector3.Lerp(transform.position, position, DriftCorrectionPercentage)); - agent.SetDestination(destination); - agent.velocity = velocity; - } + agent.SetDestination(destination); + agent.velocity = velocity; } - [ClientRPC] - private void OnNavMeshCorrectionUpdate(ulong clientId, Stream stream) + [ClientRpc] + private void OnNavMeshCorrectionUpdateClientRpc(Vector3 velocity, Vector3 position, ClientRpcParams rpcParams = default) { - using (PooledBitReader reader = PooledBitReader.Get(stream)) - { - float xVel = reader.ReadSinglePacked(); - float yVel = reader.ReadSinglePacked(); - float zVel = reader.ReadSinglePacked(); - - float xPos = reader.ReadSinglePacked(); - float yPos = reader.ReadSinglePacked(); - float zPos = reader.ReadSinglePacked(); - - Vector3 velocity = new Vector3(xVel, yVel, zVel); - Vector3 position = new Vector3(xPos, yPos, zPos); - - agent.Warp(Vector3.Lerp(transform.position, position, DriftCorrectionPercentage)); - agent.velocity = velocity; - } + agent.Warp(Vector3.Lerp(transform.position, position, DriftCorrectionPercentage)); + agent.velocity = velocity; } } } diff --git a/com.unity.multiplayer.mlapi/Runtime/Prototyping/NetworkedTransform.cs b/com.unity.multiplayer.mlapi/Runtime/Prototyping/NetworkedTransform.cs index 16e5b721b4..45f881d117 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Prototyping/NetworkedTransform.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Prototyping/NetworkedTransform.cs @@ -1,11 +1,9 @@ using System.Collections.Generic; using System.IO; - +using System.Linq; using MLAPI.Messaging; using MLAPI.Serialization.Pooled; - using UnityEngine; -using UnityEngine.Profiling; namespace MLAPI.Prototyping { @@ -27,42 +25,51 @@ internal class ClientSendInfo /// [Range(0, 120)] public float FixedSendsPerSecond = 20f; + /// /// Is the sends per second assumed to be the same across all instances /// [Tooltip("This assumes that the SendsPerSecond is synced across clients")] public bool AssumeSyncedSends = true; + /// /// Enable interpolation /// [Tooltip("This requires AssumeSyncedSends to be true")] public bool InterpolatePosition = true; + /// /// The distance before snaping to the position /// [Tooltip("The transform will snap if the distance is greater than this distance")] public float SnapDistance = 10f; + /// /// Should the server interpolate /// public bool InterpolateServer = true; + /// /// The min meters to move before a send is sent /// public float MinMeters = 0.15f; + /// /// The min degrees to rotate before a send it sent /// public float MinDegrees = 1.5f; + /// /// Enables extrapolation /// public bool ExtrapolatePosition = false; + /// /// The maximum amount of expected send rates to extrapolate over when awaiting new packets. /// A higher value will result in continued extrapolation after an object has stopped moving /// public float MaxSendsToExtrapolate = 5; + /// /// The channel to send the data on /// @@ -81,21 +88,21 @@ internal class ClientSendInfo private float lastReceiveTime; - private RpcDelegate applyTransformDelegate; - private RpcDelegate submitTransformDelegate; - /// /// Enables range based send rate /// public bool EnableRange; + /// /// Checks for missed sends without provocation. Provocation being a client inside it's normal SendRate /// public bool EnableNonProvokedResendChecks; + /// /// The curve to use to calculate the send rate /// public AnimationCurve DistanceSendrate = AnimationCurve.Constant(0, 500, 20); + private readonly Dictionary clientSendInfo = new Dictionary(); /// @@ -106,6 +113,7 @@ internal class ClientSendInfo /// The new requested position /// Returns Whether or not the move is valid public delegate bool MoveValidationDelegate(ulong clientId, Vector3 oldPos, Vector3 newPos); + /// /// If set, moves will only be accepted if the custom delegate returns true /// @@ -145,47 +153,33 @@ public override void NetworkStart() lerpEndRot = transform.rotation; } - private void Awake() - { - applyTransformDelegate = ApplyTransform; - submitTransformDelegate = SubmitTransform; - } - private void Update() { - if (IsOwner) + if (IsOwner) { - if (NetworkingManager.Singleton.NetworkTime - lastSendTime >= (1f / FixedSendsPerSecond) && (Vector3.Distance(transform.position, lastSentPos) > MinMeters || Quaternion.Angle(transform.rotation, lastSentRot) > MinDegrees)) + if (NetworkingManager.Singleton.NetworkTime - lastSendTime >= (1f / FixedSendsPerSecond) && (Vector3.Distance(transform.position, lastSentPos) > MinMeters || Quaternion.Angle(transform.rotation, lastSentRot) > MinDegrees)) { lastSendTime = NetworkingManager.Singleton.NetworkTime; lastSentPos = transform.position; lastSentRot = transform.rotation; - using (PooledBitStream stream = PooledBitStream.Get()) + + if (IsServer) { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - writer.WriteSinglePacked(transform.position.x); - writer.WriteSinglePacked(transform.position.y); - writer.WriteSinglePacked(transform.position.z); - - writer.WriteSinglePacked(transform.rotation.eulerAngles.x); - writer.WriteSinglePacked(transform.rotation.eulerAngles.y); - writer.WriteSinglePacked(transform.rotation.eulerAngles.z); - - if (IsServer) - InvokeClientRpcOnEveryoneExceptPerformance(applyTransformDelegate, OwnerClientId, stream, string.IsNullOrEmpty(Channel) ? "MLAPI_DEFAULT_MESSAGE" : Channel); - else - InvokeServerRpcPerformance(submitTransformDelegate, stream, string.IsNullOrEmpty(Channel) ? "MLAPI_DEFAULT_MESSAGE" : Channel); - } + ApplyTransformClientRpc(transform.position, transform.rotation.eulerAngles, + new ClientRpcParams {Send = new ClientRpcSendParams {TargetClientIds = NetworkingManager.Singleton.ConnectedClientsList.Where(c => c.ClientId != OwnerClientId).Select(c => c.ClientId).ToArray()}}); + } + else + { + SubmitTransformServerRpc(transform.position, transform.rotation.eulerAngles); } - } } - else { + else + { //If we are server and interpolation is turned on for server OR we are not server and interpolation is turned on - if ((IsServer && InterpolateServer && InterpolatePosition) || (!IsServer && InterpolatePosition)) + if ((IsServer && InterpolateServer && InterpolatePosition) || (!IsServer && InterpolatePosition)) { - if (Vector3.Distance(transform.position, lerpEndPos) > SnapDistance) + if (Vector3.Distance(transform.position, lerpEndPos) > SnapDistance) { //Snap, set T to 1 (100% of the lerp) lerpT = 1f; @@ -210,23 +204,12 @@ private void Update() CheckForMissedSends(); } - [ClientRPC] - private void ApplyTransform(ulong clientId, Stream stream) + [ClientRpc] + private void ApplyTransformClientRpc(Vector3 position, Vector3 eulerAngles, ClientRpcParams rpcParams = default) { - if (!enabled) - return; - - using (PooledBitReader reader = PooledBitReader.Get(stream)) + if (enabled) { - float xPos = reader.ReadSinglePacked(); - float yPos = reader.ReadSinglePacked(); - float zPos = reader.ReadSinglePacked(); - - float xRot = reader.ReadSinglePacked(); - float yRot = reader.ReadSinglePacked(); - float zRot = reader.ReadSinglePacked(); - - ApplyTransformInternal(new Vector3(xPos, yPos, zPos), Quaternion.Euler(xRot, yRot, zRot)); + ApplyTransformInternal(position, Quaternion.Euler(eulerAngles)); } } @@ -235,7 +218,7 @@ private void ApplyTransformInternal(Vector3 position, Quaternion rotation) if (!enabled) return; - if (InterpolatePosition && (!IsServer || InterpolateServer)) + if (InterpolatePosition && (!IsServer || InterpolateServer)) { lastReceiveTime = Time.unscaledTime; lerpStartPos = transform.position; @@ -244,138 +227,102 @@ private void ApplyTransformInternal(Vector3 position, Quaternion rotation) lerpEndRot = rotation; lerpT = 0; } - else + else { transform.position = position; transform.rotation = rotation; } } - [ServerRPC] - private void SubmitTransform(ulong clientId, Stream stream) + [ServerRpc] + private void SubmitTransformServerRpc(Vector3 position, Vector3 eulerAngles, ServerRpcParams rpcParams = default) { if (!enabled) return; - using (PooledBitReader reader = PooledBitReader.Get(stream)) + if (IsMoveValidDelegate != null && !IsMoveValidDelegate(rpcParams.Receive.SenderClientId, lerpEndPos, position)) { - float xPos = reader.ReadSinglePacked(); - float yPos = reader.ReadSinglePacked(); - float zPos = reader.ReadSinglePacked(); - - float xRot = reader.ReadSinglePacked(); - float yRot = reader.ReadSinglePacked(); - float zRot = reader.ReadSinglePacked(); - - if (IsMoveValidDelegate != null && !IsMoveValidDelegate(clientId, lerpEndPos, new Vector3(xPos, yPos, zPos))) - { - //Invalid move! - //TODO: Add rubber band (just a message telling them to go back) - return; - } + //Invalid move! + //TODO: Add rubber band (just a message telling them to go back) + return; + } - if (!IsClient) - { - // Dedicated server - ApplyTransformInternal(new Vector3(xPos, yPos, zPos), Quaternion.Euler(xRot, yRot, zRot)); - } + if (!IsClient) + { + // Dedicated server + ApplyTransformInternal(position, Quaternion.Euler(eulerAngles)); + } - using (PooledBitStream writeStream = PooledBitStream.Get()) + if (EnableRange) + { + for (int i = 0; i < NetworkingManager.Singleton.ConnectedClientsList.Count; i++) { - using (PooledBitWriter writer = PooledBitWriter.Get(writeStream)) + if (!clientSendInfo.ContainsKey(NetworkingManager.Singleton.ConnectedClientsList[i].ClientId)) { - writer.WriteSinglePacked(xPos); - writer.WriteSinglePacked(yPos); - writer.WriteSinglePacked(zPos); + clientSendInfo.Add(NetworkingManager.Singleton.ConnectedClientsList[i].ClientId, new ClientSendInfo() + { + lastMissedPosition = null, + lastMissedRotation = null, + lastSent = 0 + }); + } - writer.WriteSinglePacked(xRot); - writer.WriteSinglePacked(yRot); - writer.WriteSinglePacked(zRot); + ClientSendInfo info = clientSendInfo[NetworkingManager.Singleton.ConnectedClientsList[i].ClientId]; + Vector3? receiverPosition = NetworkingManager.Singleton.ConnectedClientsList[i].PlayerObject == null ? null : new Vector3?(NetworkingManager.Singleton.ConnectedClientsList[i].PlayerObject.transform.position); + Vector3? senderPosition = NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject == null ? null : new Vector3?(NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject.transform.position); - if (EnableRange) - { - for (int i = 0; i < NetworkingManager.Singleton.ConnectedClientsList.Count; i++) - { - if (!clientSendInfo.ContainsKey(NetworkingManager.Singleton.ConnectedClientsList[i].ClientId)) - { - clientSendInfo.Add(NetworkingManager.Singleton.ConnectedClientsList[i].ClientId, new ClientSendInfo() - { - lastMissedPosition = null, - lastMissedRotation = null, - lastSent = 0 - }); - } - - ClientSendInfo info = clientSendInfo[NetworkingManager.Singleton.ConnectedClientsList[i].ClientId]; - Vector3? receiverPosition = NetworkingManager.Singleton.ConnectedClientsList[i].PlayerObject == null ? null : new Vector3?(NetworkingManager.Singleton.ConnectedClientsList[i].PlayerObject.transform.position); - Vector3? senderPosition = NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject == null ? null : new Vector3?(NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject.transform.position); - - if ((receiverPosition == null || senderPosition == null && NetworkingManager.Singleton.NetworkTime - info.lastSent >= (1f / FixedSendsPerSecond)) || NetworkingManager.Singleton.NetworkTime - info.lastSent >= GetTimeForLerp(receiverPosition.Value, senderPosition.Value)) - { - info.lastSent = NetworkingManager.Singleton.NetworkTime; - info.lastMissedPosition = null; - info.lastMissedRotation = null; - - InvokeClientRpcOnClientPerformance(applyTransformDelegate, NetworkingManager.Singleton.ConnectedClientsList[i].ClientId, writeStream, string.IsNullOrEmpty(Channel) ? "MLAPI_DEFAULT_MESSAGE" : Channel); - } - else - { - info.lastMissedPosition = new Vector3(xPos, yPos, zPos); - info.lastMissedRotation = Quaternion.Euler(xRot, yRot, zRot); - } - } - } - else - { - InvokeClientRpcOnEveryoneExceptPerformance(applyTransformDelegate, OwnerClientId, writeStream, string.IsNullOrEmpty(Channel) ? "MLAPI_DEFAULT_MESSAGE" : Channel); - } + if ((receiverPosition == null || senderPosition == null && NetworkingManager.Singleton.NetworkTime - info.lastSent >= (1f / FixedSendsPerSecond)) || NetworkingManager.Singleton.NetworkTime - info.lastSent >= GetTimeForLerp(receiverPosition.Value, senderPosition.Value)) + { + info.lastSent = NetworkingManager.Singleton.NetworkTime; + info.lastMissedPosition = null; + info.lastMissedRotation = null; + ApplyTransformClientRpc(position, eulerAngles, + new ClientRpcParams {Send = new ClientRpcSendParams {TargetClientIds = new[] {NetworkingManager.Singleton.ConnectedClientsList[i].ClientId}}}); + } + else + { + info.lastMissedPosition = position; + info.lastMissedRotation = Quaternion.Euler(eulerAngles); } } } + else + { + ApplyTransformClientRpc(position, eulerAngles, + new ClientRpcParams {Send = new ClientRpcSendParams {TargetClientIds = NetworkingManager.Singleton.ConnectedClientsList.Where(c => c.ClientId != OwnerClientId).Select(c => c.ClientId).ToArray()}}); + } } private void CheckForMissedSends() { - for (int i = 0; i < NetworkingManager.Singleton.ConnectedClientsList.Count; i++) + for (int i = 0; i < NetworkingManager.Singleton.ConnectedClientsList.Count; i++) { - if (!clientSendInfo.ContainsKey(NetworkingManager.Singleton.ConnectedClientsList[i].ClientId)) + if (!clientSendInfo.ContainsKey(NetworkingManager.Singleton.ConnectedClientsList[i].ClientId)) { - clientSendInfo.Add(NetworkingManager.Singleton.ConnectedClientsList[i].ClientId, new ClientSendInfo() + clientSendInfo.Add(NetworkingManager.Singleton.ConnectedClientsList[i].ClientId, new ClientSendInfo() { lastMissedPosition = null, lastMissedRotation = null, lastSent = 0 }); } + ClientSendInfo info = clientSendInfo[NetworkingManager.Singleton.ConnectedClientsList[i].ClientId]; Vector3? receiverPosition = NetworkingManager.Singleton.ConnectedClientsList[i].PlayerObject == null ? null : new Vector3?(NetworkingManager.Singleton.ConnectedClientsList[i].PlayerObject.transform.position); Vector3? senderPosition = NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject == null ? null : new Vector3?(NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject.transform.position); - if ((receiverPosition == null || senderPosition == null && NetworkingManager.Singleton.NetworkTime - info.lastSent >= (1f / FixedSendsPerSecond)) || NetworkingManager.Singleton.NetworkTime - info.lastSent >= GetTimeForLerp(receiverPosition.Value, senderPosition.Value)) + if ((receiverPosition == null || senderPosition == null && NetworkingManager.Singleton.NetworkTime - info.lastSent >= (1f / FixedSendsPerSecond)) || NetworkingManager.Singleton.NetworkTime - info.lastSent >= GetTimeForLerp(receiverPosition.Value, senderPosition.Value)) { - Vector3? pos = NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject == null ? null : new Vector3?(NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject.transform.position); - Vector3? rot = NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject == null ? null : new Vector3?(NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject.transform.rotation.eulerAngles); + /* why is this??? ->*/Vector3? pos = NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject == null ? null : new Vector3?(NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject.transform.position); + /* why is this??? ->*/Vector3? rot = NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject == null ? null : new Vector3?(NetworkingManager.Singleton.ConnectedClients[OwnerClientId].PlayerObject.transform.rotation.eulerAngles); - if (info.lastMissedPosition != null && info.lastMissedRotation != null) + if (info.lastMissedPosition != null && info.lastMissedRotation != null) { info.lastSent = NetworkingManager.Singleton.NetworkTime; - using (PooledBitStream stream = PooledBitStream.Get()) - { - using (PooledBitWriter writer = PooledBitWriter.Get(stream)) - { - writer.WriteSinglePacked(info.lastMissedPosition.Value.x); - writer.WriteSinglePacked(info.lastMissedPosition.Value.y); - writer.WriteSinglePacked(info.lastMissedPosition.Value.z); - - writer.WriteSinglePacked(info.lastMissedRotation.Value.x); - writer.WriteSinglePacked(info.lastMissedRotation.Value.y); - writer.WriteSinglePacked(info.lastMissedRotation.Value.z); - - InvokeClientRpcOnClientPerformance(applyTransformDelegate, NetworkingManager.Singleton.ConnectedClientsList[i].ClientId, stream, string.IsNullOrEmpty(Channel) ? "MLAPI_DEFAULT_MESSAGE" : Channel); - } - } + ApplyTransformClientRpc(info.lastMissedPosition.Value, info.lastMissedRotation.Value.eulerAngles, + new ClientRpcParams {Send = new ClientRpcSendParams {TargetClientIds = new[] {NetworkingManager.Singleton.ConnectedClientsList[i].ClientId}}}); info.lastMissedPosition = null; info.lastMissedRotation = null; @@ -391,7 +338,7 @@ private void CheckForMissedSends() /// The rotation to teleport to public void Teleport(Vector3 position, Quaternion rotation) { - if (InterpolateServer && IsServer || IsClient) + if (InterpolateServer && IsServer || IsClient) { lerpStartPos = position; lerpStartRot = rotation; diff --git a/com.unity.multiplayer.mlapi/Runtime/Serialization/BitReader.cs b/com.unity.multiplayer.mlapi/Runtime/Serialization/BitReader.cs index 375044db83..788b4348c0 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Serialization/BitReader.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Serialization/BitReader.cs @@ -99,7 +99,7 @@ public object ReadObjectPacked(Type type) return null; } } - + if (SerializationManager.TryDeserialize(source, type, out object obj)) return obj; if (type.IsArray && type.HasElementType) @@ -160,12 +160,12 @@ public object ReadObjectPacked(Type type) if (type == typeof(GameObject)) { ulong networkId = ReadUInt64Packed(); - - if (SpawnManager.SpawnedObjects.ContainsKey(networkId)) + + if (SpawnManager.SpawnedObjects.ContainsKey(networkId)) { return SpawnManager.SpawnedObjects[networkId].gameObject; } - else + else { if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("BitReader cannot find the GameObject sent in the SpawnedObjects list, it may have been destroyed. NetworkId: " + networkId.ToString()); @@ -175,12 +175,12 @@ public object ReadObjectPacked(Type type) if (type == typeof(NetworkedObject)) { ulong networkId = ReadUInt64Packed(); - - if (SpawnManager.SpawnedObjects.ContainsKey(networkId)) + + if (SpawnManager.SpawnedObjects.ContainsKey(networkId)) { return SpawnManager.SpawnedObjects[networkId]; } - else + else { if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("BitReader cannot find the NetworkedObject sent in the SpawnedObjects list, it may have been destroyed. NetworkId: " + networkId.ToString()); @@ -191,11 +191,11 @@ public object ReadObjectPacked(Type type) { ulong networkId = ReadUInt64Packed(); ushort behaviourId = ReadUInt16Packed(); - if (SpawnManager.SpawnedObjects.ContainsKey(networkId)) + if (SpawnManager.SpawnedObjects.ContainsKey(networkId)) { return SpawnManager.SpawnedObjects[networkId].GetBehaviourAtOrderIndex(behaviourId); } - else + else { if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) NetworkLog.LogWarning("BitReader cannot find the NetworkedBehaviour sent in the SpawnedObjects list, it may have been destroyed. NetworkId: " + networkId.ToString()); @@ -334,6 +334,18 @@ public double ReadDoublePacked() /// The Ray read from the stream. public Ray ReadRayPacked() => new Ray(ReadVector3Packed(), ReadVector3Packed()); + /// + /// Read a Ray2D from the stream. + /// + /// The Ray2D read from the stream. + public Ray2D ReadRay2D() => new Ray2D(ReadVector2(), ReadVector2()); + + /// + /// Read a Ray2D from the stream. + /// + /// The Ray2D read from the stream. + public Ray2D ReadRay2DPacked() => new Ray2D(ReadVector2Packed(), ReadVector2Packed()); + /// /// Read a single-precision floating point value from the stream. The value is between (inclusive) the minValue and maxValue. /// @@ -430,7 +442,7 @@ public byte ReadByteBits(int bitCount) if (bitSource == null) throw new InvalidOperationException("Cannot read bits on a non BitStream stream"); if (bitCount > 8) throw new ArgumentOutOfRangeException("Cannot read more than 8 bits into an 8-bit value!"); if (bitCount < 0) throw new ArgumentOutOfRangeException("Cannot read fewer than 0 bits!"); - + int result = 0; ByteBool convert = new ByteBool(); for (int i = 0; i < bitCount; ++i) @@ -447,7 +459,7 @@ public byte ReadNibble(bool asUpper) { if (bitSource == null) throw new InvalidOperationException("Cannot read bits on a non BitStream stream"); ByteBool convert = new ByteBool(); - + byte result = (byte) ( convert.Collapse(ReadBit()) | (convert.Collapse(ReadBit()) << 1) | diff --git a/com.unity.multiplayer.mlapi/Runtime/Serialization/BitWriter.cs b/com.unity.multiplayer.mlapi/Runtime/Serialization/BitWriter.cs index 2342b9dd81..c848d6ca76 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Serialization/BitWriter.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Serialization/BitWriter.cs @@ -41,6 +41,11 @@ public void SetStream(Stream stream) bitSink = stream as BitStream; } + internal Stream GetStream() + { + return sink; + } + /// /// Writes a boxed object in a packed format /// @@ -298,6 +303,26 @@ public void WriteRayPacked(Ray ray) WriteVector3Packed(ray.direction); } + /// + /// Convenience method that writes two non-packed Vector2 from the ray to the stream + /// + /// Ray2D to write + public void WriteRay2D(Ray2D ray2d) + { + WriteVector2(ray2d.origin); + WriteVector2(ray2d.direction); + } + + /// + /// Convenience method that writes two packed Vector2 from the ray to the stream + /// + /// Ray2D to write + public void WriteRay2DPacked(Ray2D ray2d) + { + WriteVector2Packed(ray2d.origin); + WriteVector2Packed(ray2d.direction); + } + /// /// Convenience method that writes four non-varint floats from the color to the stream /// diff --git a/com.unity.multiplayer.mlapi/Runtime/Serialization/INetworkSerializable.cs b/com.unity.multiplayer.mlapi/Runtime/Serialization/INetworkSerializable.cs new file mode 100644 index 0000000000..3e2973ca46 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Runtime/Serialization/INetworkSerializable.cs @@ -0,0 +1,8 @@ +namespace MLAPI.Serialization +{ + public interface INetworkSerializable + { + void NetworkRead(BitReader reader); + void NetworkWrite(BitWriter writer); + } +} diff --git a/com.unity.multiplayer.mlapi/Runtime/Serialization/INetworkSerializable.cs.meta b/com.unity.multiplayer.mlapi/Runtime/Serialization/INetworkSerializable.cs.meta new file mode 100644 index 0000000000..13aa4d13e7 --- /dev/null +++ b/com.unity.multiplayer.mlapi/Runtime/Serialization/INetworkSerializable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dcbf989721df344779c6c845cf79444f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.multiplayer.mlapi/package.json b/com.unity.multiplayer.mlapi/package.json index c6d8ce07e4..1a9a26cc01 100644 --- a/com.unity.multiplayer.mlapi/package.json +++ b/com.unity.multiplayer.mlapi/package.json @@ -11,6 +11,7 @@ "type": "library", "hideInEditor": false, "dependencies": { + "com.unity.nuget.mono-cecil": "1.10.1-preview.1", "com.unity.collections": "0.14.0-preview.16" } } \ No newline at end of file diff --git a/testproject/Packages/manifest.json b/testproject/Packages/manifest.json index 2b8e96d56b..dd828e9d3f 100644 --- a/testproject/Packages/manifest.json +++ b/testproject/Packages/manifest.json @@ -1,9 +1,13 @@ { "dependencies": { + "com.unity.burst": "1.4.3", "com.unity.collab-proxy": "1.3.9", "com.unity.ide.rider": "1.2.1", "com.unity.ide.visualstudio": "2.0.5", "com.unity.ide.vscode": "1.2.3", + "com.unity.multiplayer.mlapi": "file:../../com.unity.multiplayer.mlapi", + "com.unity.multiplayer.transport.enet": "file:../../com.unity.multiplayer.transport.enet", + "com.unity.nuget.mono-cecil": "1.10.1-preview.1", "com.unity.test-framework": "1.1.19", "com.unity.textmeshpro": "3.0.1", "com.unity.timeline": "1.3.6", @@ -38,9 +42,6 @@ "com.unity.modules.video": "1.0.0", "com.unity.modules.vr": "1.0.0", "com.unity.modules.wind": "1.0.0", - "com.unity.modules.xr": "1.0.0", - "com.unity.multiplayer.mlapi": "file:../../com.unity.multiplayer.mlapi", - "com.unity.multiplayer.transport.enet": "file:../../com.unity.multiplayer.transport.enet", - "com.unity.multiplayer.transport.utp": "file:../../com.unity.multiplayer.transport.utp" + "com.unity.modules.xr": "1.0.0" } }