Просмотр исходного кода

优化了热更扫描Attribute的性能,所有自定义的Attribute需要继承BaseAttribute类, 每个LoadSystem中直接可以获取自己感兴趣的Attribute类型。

tanghai 7 лет назад
Родитель
Сommit
edca36ac71
39 измененных файлов с 224 добавлено и 95 удалено
  1. 3 2
      Server/Hotfix/Module/Actor/ActorMessageDispatherComponentSystem.cs
  2. 1 1
      Server/Hotfix/Module/Message/MessageDispatherComponentSystem.cs
  3. 1 1
      Server/Model/Module/Actor/ActorMessageHandlerAttribute.cs
  4. 1 1
      Server/Model/Module/Actor/ActorTypeHandlerAttribute.cs
  5. 1 1
      Server/Model/Module/Http/HttpComponent.cs
  6. 21 17
      Server/Model/Server.Model.csproj
  7. 2 2
      Unity/Assets/Scripts/Base/Event/EventAttribute.cs
  8. 5 0
      Unity/Assets/Scripts/Base/MultiMap.cs
  9. 15 0
      Unity/Assets/Scripts/Base/Object/BaseAttribute.cs
  10. 1 1
      Unity/Assets/Scripts/Base/Object/BaseAttribute.cs.meta
  11. 20 6
      Unity/Assets/Scripts/Base/Object/EventSystem.cs
  12. 1 1
      Unity/Assets/Scripts/Base/Object/ObjectSystemAttribute.cs
  13. 1 1
      Unity/Assets/Scripts/Module/Config/ConfigAttribute.cs
  14. 1 1
      Unity/Assets/Scripts/Module/Config/ConfigComponent.cs
  15. 1 1
      Unity/Assets/Scripts/Module/Message/MessageAttribute.cs
  16. 1 1
      Unity/Assets/Scripts/Module/Message/MessageDispatherComponent.cs
  17. 1 1
      Unity/Assets/Scripts/Module/Message/MessageHandlerAttribute.cs
  18. 1 1
      Unity/Assets/Scripts/Module/Message/OpcodeTypeComponent.cs
  19. 1 1
      Unity/Assets/Scripts/Module/Numeric/NumericWatcherAttribute.cs
  20. 1 1
      Unity/Assets/Scripts/Module/Numeric/NumericWatcherComponent.cs
  21. 1 1
      Unity/Assets/Scripts/Module/UI/UIComponent.cs
  22. 2 2
      Unity/Assets/Scripts/Module/UI/UIFactoryAttribute.cs
  23. 5 5
      Unity/Assets/ThirdParty/ILRuntime/Generated/CLRBindings.cs
  24. 13 13
      Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_Generic_Dictionary_2_Int32_Action_1_Google__t.cs
  25. 1 1
      Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_Generic_Dictionary_2_Int32_Action_1_Google__t.cs.meta
  26. 53 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_Generic_List_1_Type_Binding.cs
  27. 3 3
      Unity/Assets/ThirdParty/ILRuntime/Generated/System_Linq_Enumerable_Binding.cs
  28. 4 4
      Unity/Assets/ThirdParty/ILRuntime/Generated/System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Binding.cs
  29. 12 7
      Unity/Assets/ThirdParty/ILRuntime/Generated/System_Runtime_CompilerServices_TaskAwaiter_1_Google_Protobuf__t.cs
  30. 1 1
      Unity/Assets/ThirdParty/ILRuntime/Generated/System_Runtime_CompilerServices_TaskAwaiter_1_Google_Protobuf__t.cs.meta
  31. 8 8
      Unity/Assets/ThirdParty/ILRuntime/Generated/System_Threading_Tasks_TaskCompletionSource_1_Google_Protobuf__t.cs
  32. 1 1
      Unity/Assets/ThirdParty/ILRuntime/Generated/System_Threading_Tasks_TaskCompletionSource_1_Google_Protobuf__t.cs.meta
  33. 3 3
      Unity/Assets/ThirdParty/ILRuntime/Generated/System_Threading_Tasks_Task_1_Google_Protobuf_Adapt_IMessage_B_t.cs
  34. 11 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/System_Threading_Tasks_Task_1_Google_Protobuf_Adapt_IMessage_B_t.cs.meta
  35. 22 1
      Unity/Hotfix/Base/Object/EventSystem.cs
  36. 1 1
      Unity/Hotfix/Module/Config/ConfigComponent.cs
  37. 1 1
      Unity/Hotfix/Module/Message/MessageDispatherComponent.cs
  38. 1 1
      Unity/Hotfix/Module/Message/OpcodeTypeComponent.cs
  39. 1 1
      Unity/Hotfix/Module/UI/UIComponent.cs

+ 3 - 2
Server/Hotfix/Module/Actor/ActorMessageDispatherComponentSystem.cs

@@ -40,7 +40,7 @@ namespace ETHotfix
 			self.ActorMessageHandlers.Clear();
 			self.ActorTypeHandlers.Clear();
 
-			List<Type> types = Game.EventSystem.GetTypes();
+			List<Type> types = Game.EventSystem.GetTypes(typeof(ActorTypeHandlerAttribute));
 
 			foreach (Type type in types)
 			{
@@ -67,6 +67,7 @@ namespace ETHotfix
 				self.ActorTypeHandlers.Add(actorTypeHandlerAttribute.ActorType, iActorTypeHandler);
 			}
 
+			types = Game.EventSystem.GetTypes(typeof (ActorMessageHandlerAttribute));
 			foreach (Type type in types)
 			{
 				object[] attrs = type.GetCustomAttributes(typeof(ActorMessageHandlerAttribute), false);
@@ -74,7 +75,7 @@ namespace ETHotfix
 				{
 					continue;
 				}
-
+				
 				ActorMessageHandlerAttribute messageHandlerAttribute = (ActorMessageHandlerAttribute) attrs[0];
 				if (!messageHandlerAttribute.Type.Is(appType))
 				{

+ 1 - 1
Server/Hotfix/Module/Message/MessageDispatherComponentSystem.cs

@@ -33,7 +33,7 @@ namespace ETHotfix
 
 			AppType appType = Game.Scene.GetComponent<StartConfigComponent>().StartConfig.AppType;
 
-			List<Type> types = Game.EventSystem.GetTypes();
+			List<Type> types = Game.EventSystem.GetTypes(typeof(MessageHandlerAttribute));
 
 			foreach (Type type in types)
 			{

+ 1 - 1
Server/Model/Module/Actor/ActorMessageHandlerAttribute.cs

@@ -2,7 +2,7 @@
 
 namespace ETModel
 {
-	public class ActorMessageHandlerAttribute : Attribute
+	public class ActorMessageHandlerAttribute : BaseAttribute
 	{
 		public AppType Type { get; }
 

+ 1 - 1
Server/Model/Module/Actor/ActorTypeHandlerAttribute.cs

@@ -2,7 +2,7 @@
 
 namespace ETModel
 {
-	public class ActorTypeHandlerAttribute : Attribute
+	public class ActorTypeHandlerAttribute : BaseAttribute
 	{
 		public AppType Type { get; }
 

+ 1 - 1
Server/Model/Module/Http/HttpComponent.cs

@@ -67,7 +67,7 @@ namespace ETModel
 			this.getHandlers = new Dictionary<string, MethodInfo>();
 			this.postHandlers = new Dictionary<string, MethodInfo>();
 
-			List<Type> types = Game.EventSystem.GetTypes();
+			List<Type> types = Game.EventSystem.GetTypes(typeof(HttpHandlerAttribute));
 
 			foreach (Type type in types)
 			{

+ 21 - 17
Server/Model/Server.Model.csproj

@@ -34,23 +34,26 @@
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\TimeHelper.cs" Link="Base\Helper\TimeHelper.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\ZipHelper.cs" Link="Base\Helper\ZipHelper.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\MultiMap.cs" Link="Base\MultiMap.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\Component.cs" Link="Base\Object\Component.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ComponentFactory.cs" Link="Base\Object\ComponentFactory.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ComponentWithId.cs" Link="Base\Object\ComponentWithId.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\Entity.cs" Link="Base\Object\Entity.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\EventSystem.cs" Link="Base\Object\EventSystem.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\IAwakeSystem.cs" Link="Base\Object\IAwakeSystem.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\IChangeSystem.cs" Link="Base\Object\IChangeSystem.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\IComponentSerialize.cs" Link="Base\Object\IComponentSerialize.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\IDestroySystem.cs" Link="Base\Object\IDestroySystem.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ILateUpdateSystem.cs" Link="Base\Object\ILateUpdateSystem.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ILoadSystem.cs" Link="Base\Object\ILoadSystem.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ISerializeToEntity.cs" Link="Base\Object\ISerializeToEntity.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\IStartSystem.cs" Link="Base\Object\IStartSystem.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\IUpdateSystem.cs" Link="Base\Object\IUpdateSystem.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\Object.cs" Link="Base\Object\Object.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ObjectPool.cs" Link="Base\Object\ObjectPool.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ObjectSystemAttribute.cs" Link="Base\Object\ObjectSystemAttribute.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\BaseAttribute.cs" Link="Base\Base\BaseAttribute.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\Component.cs" Link="Base\Base\Component.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ComponentFactory.cs" Link="Base\Base\ComponentFactory.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ComponentWithId.cs" Link="Base\Base\ComponentWithId.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\Entity.cs" Link="Base\Base\Entity.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\EntityEventAttribute.cs" Link="Base\Base\EntityEventAttribute.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\EventProxy.cs" Link="Base\Base\EventProxy.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\EventSystem.cs" Link="Base\Base\EventSystem.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\IAwakeSystem.cs" Link="Base\Base\IAwakeSystem.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\IChangeSystem.cs" Link="Base\Base\IChangeSystem.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\IComponentSerialize.cs" Link="Base\Base\IComponentSerialize.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\IDestroySystem.cs" Link="Base\Base\IDestroySystem.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ILateUpdateSystem.cs" Link="Base\Base\ILateUpdateSystem.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ILoadSystem.cs" Link="Base\Base\ILoadSystem.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ISerializeToEntity.cs" Link="Base\Base\ISerializeToEntity.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\IStartSystem.cs" Link="Base\Base\IStartSystem.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\IUpdateSystem.cs" Link="Base\Base\IUpdateSystem.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\Object.cs" Link="Base\Base\Object.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ObjectPool.cs" Link="Base\Base\ObjectPool.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ObjectSystemAttribute.cs" Link="Base\Base\ObjectSystemAttribute.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\OneThreadSynchronizationContext.cs" Link="Base\OneThreadSynchronizationContext.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\QueueDictionary.cs" Link="Base\QueueDictionary.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\RecyclableMemoryStream\Events.cs" Link="Base\RecyclableMemoryStream\Events.cs" />
@@ -119,6 +122,7 @@
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Base\RecyclableMemoryStream\" />
+    <Folder Include="Base\Base\" />
     <Folder Include="Component\Config\" />
     <Folder Include="Module\Message\Network\KCP\" />
     <Folder Include="Module\Message\Network\TCP\" />

+ 2 - 2
Unity/Assets/Scripts/Base/Event/EventAttribute.cs

@@ -3,9 +3,9 @@
 namespace ETModel
 {
 	[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
-	public class EventAttribute: Attribute
+	public class EventAttribute: BaseAttribute
 	{
-		public string Type { get; private set; }
+		public string Type { get; }
 
 		public EventAttribute(string type)
 		{

+ 5 - 0
Unity/Assets/Scripts/Base/MultiMap.cs

@@ -157,5 +157,10 @@ namespace ETModel
 		{
 			return this.dictionary.ContainsKey(t);
 		}
+
+		public void Clear()
+		{
+			dictionary.Clear();
+		}
 	}
 }

+ 15 - 0
Unity/Assets/Scripts/Base/Object/BaseAttribute.cs

@@ -0,0 +1,15 @@
+using System;
+
+namespace ETModel
+{
+	[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
+	public class BaseAttribute: Attribute
+	{
+		public Type AttributeType { get; }
+
+		public BaseAttribute()
+		{
+			this.AttributeType = this.GetType();
+		}
+	}
+}

+ 1 - 1
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Threading_Tasks_TaskCompletionSource_1_ILTypeInstance_B_t.cs.meta → Unity/Assets/Scripts/Base/Object/BaseAttribute.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 042d6d530176b2244a472f234ba367cf
+guid: aacc1bc3c2cff3240945dea3294fdc77
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 20 - 6
Unity/Assets/Scripts/Base/Object/EventSystem.cs

@@ -17,7 +17,7 @@ namespace ETModel
 		private readonly Dictionary<long, Component> allComponents = new Dictionary<long, Component>();
 
 		private readonly Dictionary<DLLType, Assembly> assemblies = new Dictionary<DLLType, Assembly>();
-		private readonly List<Type> types = new List<Type>();
+		private readonly UnOrderMultiMap<Type, Type> types = new UnOrderMultiMap<Type, Type>();
 
 		private readonly Dictionary<string, List<IEvent>> allEvents = new Dictionary<string, List<IEvent>>();
 
@@ -52,7 +52,17 @@ namespace ETModel
 			this.types.Clear();
 			foreach (Assembly value in this.assemblies.Values)
 			{
-				this.types.AddRange(value.GetTypes());
+				foreach (Type type in value.GetTypes())
+				{
+					object[] objects = type.GetCustomAttributes(typeof(BaseAttribute), false);
+					if (objects.Length == 0)
+					{
+						continue;
+					}
+
+					BaseAttribute baseAttribute = (BaseAttribute) objects[0];
+					this.types.Add(baseAttribute.AttributeType, type);
+				}
 			}
 
 			this.awakeSystems.Clear();
@@ -62,7 +72,7 @@ namespace ETModel
 			this.loadSystems.Clear();
 			this.changeSystems.Clear();
 
-			foreach (Type type in types)
+			foreach (Type type in types[typeof(ObjectSystemAttribute)])
 			{
 				object[] attrs = type.GetCustomAttributes(typeof(ObjectSystemAttribute), false);
 
@@ -117,7 +127,7 @@ namespace ETModel
 			}
 
 			this.allEvents.Clear();
-			foreach (Type type in types)
+			foreach (Type type in types[typeof(EventAttribute)])
 			{
 				object[] attrs = type.GetCustomAttributes(typeof(EventAttribute), false);
 
@@ -151,9 +161,13 @@ namespace ETModel
 			return this.assemblies[dllType];
 		}
 		
-		public List<Type> GetTypes()
+		public List<Type> GetTypes(Type systemAttributeType)
 		{
-			return this.types;
+			if (!this.types.ContainsKey(systemAttributeType))
+			{
+				return new List<Type>();
+			}
+			return this.types[systemAttributeType];
 		}
 
 		public void Add(Component component)

+ 1 - 1
Unity/Assets/Scripts/Base/Object/ObjectSystemAttribute.cs

@@ -3,7 +3,7 @@
 namespace ETModel
 {
 	[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
-	public class ObjectSystemAttribute: Attribute
+	public class ObjectSystemAttribute: BaseAttribute
 	{
 	}
 }

+ 1 - 1
Unity/Assets/Scripts/Module/Config/ConfigAttribute.cs

@@ -3,7 +3,7 @@
 namespace ETModel
 {
 	[AttributeUsage(AttributeTargets.Class)]
-	public class ConfigAttribute: Attribute
+	public class ConfigAttribute: BaseAttribute
 	{
 		public AppType Type { get; }
 

+ 1 - 1
Unity/Assets/Scripts/Module/Config/ConfigComponent.cs

@@ -36,7 +36,7 @@ namespace ETModel
 		public void Load()
 		{
 			this.allConfig.Clear();
-			List<Type> types = Game.EventSystem.GetTypes();
+			List<Type> types = Game.EventSystem.GetTypes(typeof(ConfigAttribute));
 
 			foreach (Type type in types)
 			{

+ 1 - 1
Unity/Assets/Scripts/Module/Message/MessageAttribute.cs

@@ -2,7 +2,7 @@
 
 namespace ETModel
 {
-	public class MessageAttribute: Attribute
+	public class MessageAttribute: BaseAttribute
 	{
 		public ushort Opcode { get; }
 

+ 1 - 1
Unity/Assets/Scripts/Module/Message/MessageDispatherComponent.cs

@@ -37,7 +37,7 @@ namespace ETModel
 		{
 			this.handlers.Clear();
 
-			List<Type> types = Game.EventSystem.GetTypes();
+			List<Type> types = Game.EventSystem.GetTypes(typeof(MessageHandlerAttribute));
 
 			foreach (Type type in types)
 			{

+ 1 - 1
Unity/Assets/Scripts/Module/Message/MessageHandlerAttribute.cs

@@ -2,7 +2,7 @@
 
 namespace ETModel
 {
-	public class MessageHandlerAttribute : Attribute
+	public class MessageHandlerAttribute : BaseAttribute
 	{
 		public AppType Type { get; }
 

+ 1 - 1
Unity/Assets/Scripts/Module/Message/OpcodeTypeComponent.cs

@@ -32,7 +32,7 @@ namespace ETModel
 			this.opcodeTypes.Clear();
 			this.typeMessages.Clear();
 			
-			List<Type> types = Game.EventSystem.GetTypes();
+			List<Type> types = Game.EventSystem.GetTypes(typeof(MessageAttribute));
 			foreach (Type type in types)
 			{
 				object[] attrs = type.GetCustomAttributes(typeof(MessageAttribute), false);

+ 1 - 1
Unity/Assets/Scripts/Module/Numeric/NumericWatcherAttribute.cs

@@ -2,7 +2,7 @@
 
 namespace ETModel
 {
-	public class NumericWatcherAttribute : Attribute
+	public class NumericWatcherAttribute : BaseAttribute
 	{
 		public NumericType NumericType { get; }
 

+ 1 - 1
Unity/Assets/Scripts/Module/Numeric/NumericWatcherComponent.cs

@@ -37,7 +37,7 @@ namespace ETModel
 		{
 			this.allWatchers = new Dictionary<NumericType, List<INumericWatcher>>();
 
-			List<Type> types = Game.EventSystem.GetTypes();
+			List<Type> types = Game.EventSystem.GetTypes(typeof(NumericWatcherAttribute));
 			foreach (Type type in types)
 			{
 				object[] attrs = type.GetCustomAttributes(typeof(NumericWatcherAttribute), false);

+ 1 - 1
Unity/Assets/Scripts/Module/UI/UIComponent.cs

@@ -66,7 +66,7 @@ namespace ETModel
 		{
 			this.UiTypes.Clear();
             
-			List<Type> types = Game.EventSystem.GetTypes();
+			List<Type> types = Game.EventSystem.GetTypes(typeof(UIFactoryAttribute));
 
 			foreach (Type type in types)
 			{

+ 2 - 2
Unity/Assets/Scripts/Module/UI/UIFactoryAttribute.cs

@@ -3,9 +3,9 @@
 namespace ETModel
 {
 	[AttributeUsage(AttributeTargets.Class)]
-	public class UIFactoryAttribute: Attribute
+	public class UIFactoryAttribute: BaseAttribute
 	{
-		public string Type { get; private set; }
+		public string Type { get; }
 
 		public UIFactoryAttribute(string type)
 		{

+ 5 - 5
Unity/Assets/ThirdParty/ILRuntime/Generated/CLRBindings.cs

@@ -29,8 +29,8 @@ namespace ILRuntime.Runtime.Generated
             UnityEngine_Vector3_Binding.Register(app);
             ETModel_Session_Binding.Register(app);
             System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Binding.Register(app);
-            System_Threading_Tasks_Task_1_ILTypeInstance_Binding.Register(app);
-            System_Runtime_CompilerServices_TaskAwaiter_1_ILTypeInstance_Binding.Register(app);
+            System_Threading_Tasks_Task_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
+            System_Runtime_CompilerServices_TaskAwaiter_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
             ETModel_Game_Binding.Register(app);
             ETModel_Entity_Binding.Register(app);
             ETModel_ResourcesComponent_Binding.Register(app);
@@ -51,7 +51,6 @@ namespace ILRuntime.Runtime.Generated
             ETModel_Actor_Test_Binding.Register(app);
             ETModel_MoveComponent_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding.Register(app);
-            ETModel_Hotfix_Binding.Register(app);
             System_Collections_Generic_List_1_Type_Binding.Register(app);
             System_Collections_Generic_List_1_Type_Binding_Enumerator_Binding.Register(app);
             System_Type_Binding.Register(app);
@@ -71,19 +70,20 @@ namespace ILRuntime.Runtime.Generated
             ETModel_UnOrderMultiMap_2_Type_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_Queue_1_Int64_Binding.Register(app);
             System_Collections_Generic_List_1_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
+            ETModel_Hotfix_Binding.Register(app);
             ETModel_EventAttribute_Binding.Register(app);
             ETModel_EventProxy_Binding.Register(app);
             ETModel_EventSystem_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_Queue_1_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_Queue_1_ILTypeInstance_Binding.Register(app);
             ETModel_SessionCallbackComponent_Binding.Register(app);
-            System_Collections_Generic_Dictionary_2_Int32_Action_1_ILTypeInstance_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_Int32_Action_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
             ETModel_Component_Binding.Register(app);
             ETModel_Packet_Binding.Register(app);
             ETModel_NetworkComponent_Binding.Register(app);
             ETModel_IMessagePacker_Binding.Register(app);
             ETModel_MessageInfo_Binding.Register(app);
-            System_Threading_Tasks_TaskCompletionSource_1_ILTypeInstance_Binding.Register(app);
+            System_Threading_Tasks_TaskCompletionSource_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
             System_Threading_CancellationToken_Binding.Register(app);
             ETModel_ErrorCode_Binding.Register(app);
             ETModel_RpcException_Binding.Register(app);

+ 13 - 13
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_Generic_Dictionary_2_Int32_Action_1_ILTypeI_t.cs → Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_Generic_Dictionary_2_Int32_Action_1_Google__t.cs

@@ -13,27 +13,27 @@ using ILRuntime.CLR.Utils;
 
 namespace ILRuntime.Runtime.Generated
 {
-    unsafe class System_Collections_Generic_Dictionary_2_Int32_Action_1_ILTypeInstance_Binding
+    unsafe class System_Collections_Generic_Dictionary_2_Int32_Action_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding
     {
         public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
         {
             BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
             MethodBase method;
             Type[] args;
-            Type type = typeof(System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>);
+            Type type = typeof(System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>);
             args = new Type[]{};
             method = type.GetMethod("get_Values", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, get_Values_0);
             args = new Type[]{};
             method = type.GetMethod("Clear", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, Clear_1);
-            args = new Type[]{typeof(System.Int32), typeof(System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>).MakeByRefType()};
+            args = new Type[]{typeof(System.Int32), typeof(System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>).MakeByRefType()};
             method = type.GetMethod("TryGetValue", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, TryGetValue_2);
             args = new Type[]{typeof(System.Int32)};
             method = type.GetMethod("Remove", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, Remove_3);
-            args = new Type[]{typeof(System.Int32), typeof(System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>)};
+            args = new Type[]{typeof(System.Int32), typeof(System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>)};
             method = type.GetMethod("set_Item", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, set_Item_4);
 
@@ -51,7 +51,7 @@ namespace ILRuntime.Runtime.Generated
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>)typeof(System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
             var result_of_this_method = instance_of_this_method.Values;
@@ -66,7 +66,7 @@ namespace ILRuntime.Runtime.Generated
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>)typeof(System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
             instance_of_this_method.Clear();
@@ -82,13 +82,13 @@ namespace ILRuntime.Runtime.Generated
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
-            System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance> @value = (System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Action<Google.Protobuf.Adapt_IMessage.Adaptor> @value = (System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>)typeof(System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Int32 @key = ptr_of_this_method->Value;
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
-            System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>)typeof(System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
             var result_of_this_method = instance_of_this_method.TryGetValue(@key, out @value);
@@ -141,7 +141,7 @@ namespace ILRuntime.Runtime.Generated
                     break;
                  case ObjectTypes.ArrayReference:
                     {
-                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>[];
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>[];
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = value;
                     }
                     break;
@@ -162,7 +162,7 @@ namespace ILRuntime.Runtime.Generated
             System.Int32 @key = ptr_of_this_method->Value;
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>)typeof(System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
             var result_of_this_method = instance_of_this_method.Remove(@key);
@@ -179,14 +179,14 @@ namespace ILRuntime.Runtime.Generated
             StackObject* __ret = ILIntepreter.Minus(__esp, 3);
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance> @value = (System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Action<Google.Protobuf.Adapt_IMessage.Adaptor> @value = (System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>)typeof(System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Int32 @key = ptr_of_this_method->Value;
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
-            System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>)typeof(System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
             instance_of_this_method[key] = value;
@@ -200,7 +200,7 @@ namespace ILRuntime.Runtime.Generated
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* __ret = ILIntepreter.Minus(__esp, 0);
 
-            var result_of_this_method = new System.Collections.Generic.Dictionary<System.Int32, System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>();
+            var result_of_this_method = new System.Collections.Generic.Dictionary<System.Int32, System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>();
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }

+ 1 - 1
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_Generic_Dictionary_2_Int32_Action_1_ILTypeI_t.cs.meta → Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_Generic_Dictionary_2_Int32_Action_1_Google__t.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 8f935598460d7fb4db9debcf67fa5b28
+guid: 44e8edd90a7217f40b647cd6eddc7b9d
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 53 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_Generic_List_1_Type_Binding.cs

@@ -24,7 +24,16 @@ namespace ILRuntime.Runtime.Generated
             args = new Type[]{};
             method = type.GetMethod("GetEnumerator", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, GetEnumerator_0);
+            args = new Type[]{};
+            method = type.GetMethod("Clear", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Clear_1);
+            args = new Type[]{typeof(System.Type)};
+            method = type.GetMethod("Add", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Add_2);
 
+            args = new Type[]{};
+            method = type.GetConstructor(flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Ctor_0);
 
         }
 
@@ -44,6 +53,50 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
 
+        static StackObject* Clear_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* ptr_of_this_method;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Collections.Generic.List<System.Type> instance_of_this_method = (System.Collections.Generic.List<System.Type>)typeof(System.Collections.Generic.List<System.Type>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Clear();
+
+            return __ret;
+        }
+
+        static StackObject* Add_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* ptr_of_this_method;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Type @item = (System.Type)typeof(System.Type).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Collections.Generic.List<System.Type> instance_of_this_method = (System.Collections.Generic.List<System.Type>)typeof(System.Collections.Generic.List<System.Type>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Add(@item);
+
+            return __ret;
+        }
+
+
+        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
+
+            var result_of_this_method = new System.Collections.Generic.List<System.Type>();
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
 
 
     }

+ 3 - 3
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Linq_Enumerable_Binding.cs

@@ -48,7 +48,7 @@ namespace ILRuntime.Runtime.Generated
                     }
                 }
             }
-            args = new Type[]{typeof(System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>)};
+            args = new Type[]{typeof(System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>)};
             if (genericMethods.TryGetValue("ToArray", out lst))
             {
                 foreach(var m in lst)
@@ -118,11 +118,11 @@ namespace ILRuntime.Runtime.Generated
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.IEnumerable<System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>> @source = (System.Collections.Generic.IEnumerable<System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.IEnumerable<System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Collections.Generic.IEnumerable<System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>> @source = (System.Collections.Generic.IEnumerable<System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>)typeof(System.Collections.Generic.IEnumerable<System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = System.Linq.Enumerable.ToArray<System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>(@source);
+            var result_of_this_method = System.Linq.Enumerable.ToArray<System.Action<Google.Protobuf.Adapt_IMessage.Adaptor>>(@source);
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }

+ 4 - 4
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Binding.cs

@@ -52,7 +52,7 @@ namespace ILRuntime.Runtime.Generated
                     }
                 }
             }
-            args = new Type[]{typeof(System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance>), typeof(ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
+            args = new Type[]{typeof(System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>), typeof(ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             {
                 foreach(var m in lst)
@@ -239,13 +239,13 @@ namespace ILRuntime.Runtime.Generated
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
-            System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance> @awaiter = (System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor> @awaiter = (System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>)typeof(System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             System.Runtime.CompilerServices.AsyncVoidMethodBuilder instance_of_this_method = (System.Runtime.CompilerServices.AsyncVoidMethodBuilder)typeof(System.Runtime.CompilerServices.AsyncVoidMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
 
-            instance_of_this_method.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance>, ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
+            instance_of_this_method.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>, ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
 
             WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method);
 
@@ -351,7 +351,7 @@ namespace ILRuntime.Runtime.Generated
                     break;
                  case ObjectTypes.ArrayReference:
                     {
-                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance>[];
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>[];
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = awaiter;
                     }
                     break;

+ 12 - 7
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Runtime_CompilerServices_TaskAwaiter_1_ILTypeInstance_B_t.cs → Unity/Assets/ThirdParty/ILRuntime/Generated/System_Runtime_CompilerServices_TaskAwaiter_1_Google_Protobuf__t.cs

@@ -13,14 +13,14 @@ using ILRuntime.CLR.Utils;
 
 namespace ILRuntime.Runtime.Generated
 {
-    unsafe class System_Runtime_CompilerServices_TaskAwaiter_1_ILTypeInstance_Binding
+    unsafe class System_Runtime_CompilerServices_TaskAwaiter_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding
     {
         public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
         {
             BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
             MethodBase method;
             Type[] args;
-            Type type = typeof(System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance>);
+            Type type = typeof(System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>);
             args = new Type[]{};
             method = type.GetMethod("get_IsCompleted", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, get_IsCompleted_0);
@@ -28,12 +28,12 @@ namespace ILRuntime.Runtime.Generated
             method = type.GetMethod("GetResult", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, GetResult_1);
 
-            app.RegisterCLRCreateDefaultInstance(type, () => new System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance>());
+            app.RegisterCLRCreateDefaultInstance(type, () => new System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>());
 
 
         }
 
-        static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList<object> __mStack, ref System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method)
+        static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList<object> __mStack, ref System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor> instance_of_this_method)
         {
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             switch(ptr_of_this_method->ObjectType)
@@ -72,7 +72,7 @@ namespace ILRuntime.Runtime.Generated
                     break;
                  case ObjectTypes.ArrayReference:
                     {
-                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance>[];
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>[];
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method;
                     }
                     break;
@@ -87,7 +87,7 @@ namespace ILRuntime.Runtime.Generated
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
-            System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor> instance_of_this_method = (System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>)typeof(System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
 
             var result_of_this_method = instance_of_this_method.IsCompleted;
 
@@ -106,12 +106,17 @@ namespace ILRuntime.Runtime.Generated
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
-            System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Runtime.CompilerServices.TaskAwaiter<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor> instance_of_this_method = (System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>)typeof(System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
 
             var result_of_this_method = instance_of_this_method.GetResult();
 
             WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method);
 
+            object obj_result_of_this_method = result_of_this_method;
+            if(obj_result_of_this_method is CrossBindingAdaptorType)
+            {    
+                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
+            }
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
 

+ 1 - 1
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Threading_Tasks_Task_1_ILTypeInstance_Binding.cs.meta → Unity/Assets/ThirdParty/ILRuntime/Generated/System_Runtime_CompilerServices_TaskAwaiter_1_Google_Protobuf__t.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: acf3b500f07f2eb44bb0ca0db192bd1c
+guid: 5457864dac4035748bfbd02f80a43bd8
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 8 - 8
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Threading_Tasks_TaskCompletionSource_1_ILTypeInstance_B_t.cs → Unity/Assets/ThirdParty/ILRuntime/Generated/System_Threading_Tasks_TaskCompletionSource_1_Google_Protobuf__t.cs

@@ -13,18 +13,18 @@ using ILRuntime.CLR.Utils;
 
 namespace ILRuntime.Runtime.Generated
 {
-    unsafe class System_Threading_Tasks_TaskCompletionSource_1_ILTypeInstance_Binding
+    unsafe class System_Threading_Tasks_TaskCompletionSource_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding
     {
         public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
         {
             BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
             MethodBase method;
             Type[] args;
-            Type type = typeof(System.Threading.Tasks.TaskCompletionSource<ILRuntime.Runtime.Intepreter.ILTypeInstance>);
+            Type type = typeof(System.Threading.Tasks.TaskCompletionSource<Google.Protobuf.Adapt_IMessage.Adaptor>);
             args = new Type[]{};
             method = type.GetMethod("get_Task", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, get_Task_0);
-            args = new Type[]{typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
+            args = new Type[]{typeof(Google.Protobuf.Adapt_IMessage.Adaptor)};
             method = type.GetMethod("SetResult", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, SetResult_1);
             args = new Type[]{typeof(System.Exception)};
@@ -45,7 +45,7 @@ namespace ILRuntime.Runtime.Generated
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Threading.Tasks.TaskCompletionSource<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Threading.Tasks.TaskCompletionSource<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Threading.Tasks.TaskCompletionSource<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Threading.Tasks.TaskCompletionSource<Google.Protobuf.Adapt_IMessage.Adaptor> instance_of_this_method = (System.Threading.Tasks.TaskCompletionSource<Google.Protobuf.Adapt_IMessage.Adaptor>)typeof(System.Threading.Tasks.TaskCompletionSource<Google.Protobuf.Adapt_IMessage.Adaptor>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
             var result_of_this_method = instance_of_this_method.Task;
@@ -65,11 +65,11 @@ namespace ILRuntime.Runtime.Generated
             StackObject* __ret = ILIntepreter.Minus(__esp, 2);
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            ILRuntime.Runtime.Intepreter.ILTypeInstance @result = (ILRuntime.Runtime.Intepreter.ILTypeInstance)typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            Google.Protobuf.Adapt_IMessage.Adaptor @result = (Google.Protobuf.Adapt_IMessage.Adaptor)typeof(Google.Protobuf.Adapt_IMessage.Adaptor).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.Threading.Tasks.TaskCompletionSource<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Threading.Tasks.TaskCompletionSource<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Threading.Tasks.TaskCompletionSource<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Threading.Tasks.TaskCompletionSource<Google.Protobuf.Adapt_IMessage.Adaptor> instance_of_this_method = (System.Threading.Tasks.TaskCompletionSource<Google.Protobuf.Adapt_IMessage.Adaptor>)typeof(System.Threading.Tasks.TaskCompletionSource<Google.Protobuf.Adapt_IMessage.Adaptor>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
             instance_of_this_method.SetResult(@result);
@@ -88,7 +88,7 @@ namespace ILRuntime.Runtime.Generated
             __intp.Free(ptr_of_this_method);
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.Threading.Tasks.TaskCompletionSource<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Threading.Tasks.TaskCompletionSource<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Threading.Tasks.TaskCompletionSource<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Threading.Tasks.TaskCompletionSource<Google.Protobuf.Adapt_IMessage.Adaptor> instance_of_this_method = (System.Threading.Tasks.TaskCompletionSource<Google.Protobuf.Adapt_IMessage.Adaptor>)typeof(System.Threading.Tasks.TaskCompletionSource<Google.Protobuf.Adapt_IMessage.Adaptor>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
             instance_of_this_method.SetException(@exception);
@@ -102,7 +102,7 @@ namespace ILRuntime.Runtime.Generated
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* __ret = ILIntepreter.Minus(__esp, 0);
 
-            var result_of_this_method = new System.Threading.Tasks.TaskCompletionSource<ILRuntime.Runtime.Intepreter.ILTypeInstance>();
+            var result_of_this_method = new System.Threading.Tasks.TaskCompletionSource<Google.Protobuf.Adapt_IMessage.Adaptor>();
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }

+ 1 - 1
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Runtime_CompilerServices_TaskAwaiter_1_ILTypeInstance_B_t.cs.meta → Unity/Assets/ThirdParty/ILRuntime/Generated/System_Threading_Tasks_TaskCompletionSource_1_Google_Protobuf__t.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 005aa318bb1e9fa4288ba76abbcd77c3
+guid: 4b7772e99c5a4f04b9c40faa168c3197
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 3 - 3
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Threading_Tasks_Task_1_ILTypeInstance_Binding.cs → Unity/Assets/ThirdParty/ILRuntime/Generated/System_Threading_Tasks_Task_1_Google_Protobuf_Adapt_IMessage_B_t.cs

@@ -13,14 +13,14 @@ using ILRuntime.CLR.Utils;
 
 namespace ILRuntime.Runtime.Generated
 {
-    unsafe class System_Threading_Tasks_Task_1_ILTypeInstance_Binding
+    unsafe class System_Threading_Tasks_Task_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding
     {
         public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
         {
             BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
             MethodBase method;
             Type[] args;
-            Type type = typeof(System.Threading.Tasks.Task<ILRuntime.Runtime.Intepreter.ILTypeInstance>);
+            Type type = typeof(System.Threading.Tasks.Task<Google.Protobuf.Adapt_IMessage.Adaptor>);
             args = new Type[]{};
             method = type.GetMethod("GetAwaiter", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, GetAwaiter_0);
@@ -36,7 +36,7 @@ namespace ILRuntime.Runtime.Generated
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Threading.Tasks.Task<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Threading.Tasks.Task<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Threading.Tasks.Task<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            System.Threading.Tasks.Task<Google.Protobuf.Adapt_IMessage.Adaptor> instance_of_this_method = (System.Threading.Tasks.Task<Google.Protobuf.Adapt_IMessage.Adaptor>)typeof(System.Threading.Tasks.Task<Google.Protobuf.Adapt_IMessage.Adaptor>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
             var result_of_this_method = instance_of_this_method.GetAwaiter();

+ 11 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Threading_Tasks_Task_1_Google_Protobuf_Adapt_IMessage_B_t.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6bf0632d12c19af4e8c533f163c694f3
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 22 - 1
Unity/Hotfix/Base/Object/EventSystem.cs

@@ -7,6 +7,8 @@ namespace ETHotfix
 	public sealed class EventSystem
 	{
 		private readonly Dictionary<long, Component> allComponents = new Dictionary<long, Component>();
+		
+		private readonly List<Type> types = new List<Type>();
 
 		private readonly Dictionary<string, List<IEvent>> allEvents = new Dictionary<string, List<IEvent>>();
 
@@ -37,7 +39,21 @@ namespace ETHotfix
 
 		public EventSystem()
 		{
-			List<Type> types = ETModel.Game.Hotfix.GetHotfixTypes();
+			this.types.Clear();
+			
+			List<Type> ts = ETModel.Game.Hotfix.GetHotfixTypes();
+			
+			foreach (Type type in ts)
+			{
+				// ILRuntime无法判断是否有Attribute
+				//if (type.GetCustomAttributes(typeof (Attribute), false).Length == 0)
+				//{
+				//	continue;
+				//}
+				
+				this.types.Add(type);	
+			}
+			
 			foreach (Type type in types)
 			{
 				object[] attrs = type.GetCustomAttributes(typeof(ObjectSystemAttribute), false);
@@ -144,6 +160,11 @@ namespace ETHotfix
 			}
 			this.allEvents[eventId].Add(e);
 		}
+		
+		public List<Type> GetTypes()
+		{
+			return this.types;
+		}
 
 		public void Add(Component component)
 		{

+ 1 - 1
Unity/Hotfix/Module/Config/ConfigComponent.cs

@@ -37,7 +37,7 @@ namespace ETHotfix
 		public void Load()
 		{
 			this.allConfig.Clear();
-			List<Type> types = ETModel.Game.Hotfix.GetHotfixTypes();
+			List<Type> types = Game.EventSystem.GetTypes();
 
 			foreach (Type type in types)
 			{

+ 1 - 1
Unity/Hotfix/Module/Message/MessageDispatherComponent.cs

@@ -41,7 +41,7 @@ namespace ETHotfix
 			ETModel.MessageDispatherComponent messageDispatherComponent = ETModel.Game.Scene.GetComponent<ETModel.MessageDispatherComponent>();
 			ETModel.OpcodeTypeComponent opcodeTypeComponent = ETModel.Game.Scene.GetComponent<ETModel.OpcodeTypeComponent>();
 
-			List<Type> types = ETModel.Game.Hotfix.GetHotfixTypes();
+			List<Type> types = Game.EventSystem.GetTypes();
 
 			foreach (Type type in types)
 			{

+ 1 - 1
Unity/Hotfix/Module/Message/OpcodeTypeComponent.cs

@@ -33,7 +33,7 @@ namespace ETHotfix
 			this.opcodeTypes.Clear();
 			this.typeMessages.Clear();
 			
-			List<Type> types = ETModel.Game.Hotfix.GetHotfixTypes();
+			List<Type> types = Game.EventSystem.GetTypes();
 			foreach (Type type in types)
 			{
 				object[] attrs = type.GetCustomAttributes(typeof(MessageAttribute), false);

+ 1 - 1
Unity/Hotfix/Module/UI/UIComponent.cs

@@ -67,7 +67,7 @@ namespace ETHotfix
 		{
 			UiTypes.Clear();
             
-			List<Type> types = ETModel.Game.Hotfix.GetHotfixTypes();
+			List<Type> types = Game.EventSystem.GetTypes();
 
 			foreach (Type type in types)
 			{