mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 19:10:32 +00:00
Merged master
This commit is contained in:
commit
192f79c92b
6
.github/workflows/RunUnityTests.yml
vendored
6
.github/workflows/RunUnityTests.yml
vendored
@ -12,9 +12,9 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
unityVersion:
|
unityVersion:
|
||||||
- 2019.4.40f1
|
- 2019.4.40f1
|
||||||
- 2020.3.44f1
|
- 2020.3.45f1
|
||||||
- 2021.3.18f1
|
- 2021.3.19f1
|
||||||
- 2022.2.6f1
|
- 2022.2.7f1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
@ -77,28 +77,14 @@ public WeaverTypes(AssemblyDefinition assembly, Logger Log, ref bool WeavingFail
|
|||||||
|
|
||||||
TypeReference NetworkServerType = Import(typeof(NetworkServer));
|
TypeReference NetworkServerType = Import(typeof(NetworkServer));
|
||||||
NetworkServerGetActive = Resolvers.ResolveMethod(NetworkServerType, assembly, Log, "get_active", ref WeavingFailed);
|
NetworkServerGetActive = Resolvers.ResolveMethod(NetworkServerType, assembly, Log, "get_active", ref WeavingFailed);
|
||||||
|
|
||||||
TypeReference NetworkClientType = Import(typeof(NetworkClient));
|
TypeReference NetworkClientType = Import(typeof(NetworkClient));
|
||||||
NetworkClientGetActive = Resolvers.ResolveMethod(NetworkClientType, assembly, Log, "get_active", ref WeavingFailed);
|
NetworkClientGetActive = Resolvers.ResolveMethod(NetworkClientType, assembly, Log, "get_active", ref WeavingFailed);
|
||||||
|
NetworkClientConnectionReference = Resolvers.ResolveMethod(NetworkClientType, assembly, Log, "get_connection", ref WeavingFailed);
|
||||||
TypeReference RemoteCallDelegateType = Import<RemoteCalls.RemoteCallDelegate>();
|
|
||||||
RemoteCallDelegateConstructor = Resolvers.ResolveMethod(RemoteCallDelegateType, assembly, Log, ".ctor", ref WeavingFailed);
|
|
||||||
|
|
||||||
TypeReference NetworkBehaviourType = Import<NetworkBehaviour>();
|
TypeReference NetworkBehaviourType = Import<NetworkBehaviour>();
|
||||||
TypeReference RemoteProcedureCallsType = Import(typeof(RemoteCalls.RemoteProcedureCalls));
|
|
||||||
|
|
||||||
TypeReference ScriptableObjectType = Import<ScriptableObject>();
|
|
||||||
|
|
||||||
ScriptableObjectCreateInstanceMethod = Resolvers.ResolveMethod(
|
|
||||||
ScriptableObjectType, assembly, Log,
|
|
||||||
md => md.Name == "CreateInstance" && md.HasGenericParameters,
|
|
||||||
ref WeavingFailed);
|
|
||||||
|
|
||||||
NetworkBehaviourDirtyBitsReference = Resolvers.ResolveProperty(NetworkBehaviourType, assembly, "syncVarDirtyBits");
|
NetworkBehaviourDirtyBitsReference = Resolvers.ResolveProperty(NetworkBehaviourType, assembly, "syncVarDirtyBits");
|
||||||
TypeReference NetworkWriterPoolType = Import(typeof(NetworkWriterPool));
|
|
||||||
GetWriterReference = Resolvers.ResolveMethod(NetworkWriterPoolType, assembly, Log, "Get", ref WeavingFailed);
|
|
||||||
ReturnWriterReference = Resolvers.ResolveMethod(NetworkWriterPoolType, assembly, Log, "Return", ref WeavingFailed);
|
|
||||||
|
|
||||||
NetworkClientConnectionReference = Resolvers.ResolveMethod(NetworkClientType, assembly, Log, "get_connection", ref WeavingFailed);
|
|
||||||
|
|
||||||
generatedSyncVarSetter = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "GeneratedSyncVarSetter", ref WeavingFailed);
|
generatedSyncVarSetter = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "GeneratedSyncVarSetter", ref WeavingFailed);
|
||||||
generatedSyncVarSetter_GameObject = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "GeneratedSyncVarSetter_GameObject", ref WeavingFailed);
|
generatedSyncVarSetter_GameObject = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "GeneratedSyncVarSetter_GameObject", ref WeavingFailed);
|
||||||
@ -114,9 +100,25 @@ public WeaverTypes(AssemblyDefinition assembly, Logger Log, ref bool WeavingFail
|
|||||||
getSyncVarNetworkIdentityReference = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "GetSyncVarNetworkIdentity", ref WeavingFailed);
|
getSyncVarNetworkIdentityReference = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "GetSyncVarNetworkIdentity", ref WeavingFailed);
|
||||||
getSyncVarNetworkBehaviourReference = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "GetSyncVarNetworkBehaviour", ref WeavingFailed);
|
getSyncVarNetworkBehaviourReference = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "GetSyncVarNetworkBehaviour", ref WeavingFailed);
|
||||||
|
|
||||||
|
sendCommandInternal = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "SendCommandInternal", ref WeavingFailed);
|
||||||
|
sendRpcInternal = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "SendRPCInternal", ref WeavingFailed);
|
||||||
|
sendTargetRpcInternal = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "SendTargetRPCInternal", ref WeavingFailed);
|
||||||
|
|
||||||
|
InitSyncObjectReference = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "InitSyncObject", ref WeavingFailed);
|
||||||
|
|
||||||
|
TypeReference RemoteProcedureCallsType = Import(typeof(RemoteCalls.RemoteProcedureCalls));
|
||||||
registerCommandReference = Resolvers.ResolveMethod(RemoteProcedureCallsType, assembly, Log, "RegisterCommand", ref WeavingFailed);
|
registerCommandReference = Resolvers.ResolveMethod(RemoteProcedureCallsType, assembly, Log, "RegisterCommand", ref WeavingFailed);
|
||||||
registerRpcReference = Resolvers.ResolveMethod(RemoteProcedureCallsType, assembly, Log, "RegisterRpc", ref WeavingFailed);
|
registerRpcReference = Resolvers.ResolveMethod(RemoteProcedureCallsType, assembly, Log, "RegisterRpc", ref WeavingFailed);
|
||||||
|
|
||||||
|
TypeReference RemoteCallDelegateType = Import<RemoteCalls.RemoteCallDelegate>();
|
||||||
|
RemoteCallDelegateConstructor = Resolvers.ResolveMethod(RemoteCallDelegateType, assembly, Log, ".ctor", ref WeavingFailed);
|
||||||
|
|
||||||
|
TypeReference ScriptableObjectType = Import<ScriptableObject>();
|
||||||
|
ScriptableObjectCreateInstanceMethod = Resolvers.ResolveMethod(
|
||||||
|
ScriptableObjectType, assembly, Log,
|
||||||
|
md => md.Name == "CreateInstance" && md.HasGenericParameters,
|
||||||
|
ref WeavingFailed);
|
||||||
|
|
||||||
TypeReference unityDebug = Import(typeof(UnityEngine.Debug));
|
TypeReference unityDebug = Import(typeof(UnityEngine.Debug));
|
||||||
// these have multiple methods with same name, so need to check parameters too
|
// these have multiple methods with same name, so need to check parameters too
|
||||||
logErrorReference = Resolvers.ResolveMethod(unityDebug, assembly, Log, md =>
|
logErrorReference = Resolvers.ResolveMethod(unityDebug, assembly, Log, md =>
|
||||||
@ -133,11 +135,10 @@ public WeaverTypes(AssemblyDefinition assembly, Logger Log, ref bool WeavingFail
|
|||||||
|
|
||||||
TypeReference typeType = Import(typeof(Type));
|
TypeReference typeType = Import(typeof(Type));
|
||||||
getTypeFromHandleReference = Resolvers.ResolveMethod(typeType, assembly, Log, "GetTypeFromHandle", ref WeavingFailed);
|
getTypeFromHandleReference = Resolvers.ResolveMethod(typeType, assembly, Log, "GetTypeFromHandle", ref WeavingFailed);
|
||||||
sendCommandInternal = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "SendCommandInternal", ref WeavingFailed);
|
|
||||||
sendRpcInternal = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "SendRPCInternal", ref WeavingFailed);
|
|
||||||
sendTargetRpcInternal = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "SendTargetRPCInternal", ref WeavingFailed);
|
|
||||||
|
|
||||||
InitSyncObjectReference = Resolvers.ResolveMethod(NetworkBehaviourType, assembly, Log, "InitSyncObject", ref WeavingFailed);
|
TypeReference NetworkWriterPoolType = Import(typeof(NetworkWriterPool));
|
||||||
|
GetWriterReference = Resolvers.ResolveMethod(NetworkWriterPoolType, assembly, Log, "Get", ref WeavingFailed);
|
||||||
|
ReturnWriterReference = Resolvers.ResolveMethod(NetworkWriterPoolType, assembly, Log, "Return", ref WeavingFailed);
|
||||||
|
|
||||||
TypeReference readerExtensions = Import(typeof(NetworkReaderExtensions));
|
TypeReference readerExtensions = Import(typeof(NetworkReaderExtensions));
|
||||||
readNetworkBehaviourGeneric = Resolvers.ResolveMethod(readerExtensions, assembly, Log, (md =>
|
readNetworkBehaviourGeneric = Resolvers.ResolveMethod(readerExtensions, assembly, Log, (md =>
|
||||||
|
Loading…
Reference in New Issue
Block a user