Jelajahi Sumber

客户端协议热更成功!

tanghai 8 tahun lalu
induk
melakukan
145650750a
100 mengubah file dengan 3074 tambahan dan 96 penghapusan
  1. 3 3
      Server/Hotfix/Module/Actor/ActorComponentSystem.cs
  2. 1 1
      Server/Hotfix/Module/Network/InnerMessageDispatcher.cs
  3. 2 2
      Server/Hotfix/Module/Network/NetInnerComponentSystem.cs
  4. 1 1
      Server/Hotfix/Module/Network/OuterMessageDispatcher.cs
  5. 1 1
      Server/Hotfix/System/RealmGateAddressComponentSystem.cs
  6. 1 1
      Server/Model/Component/Unit/LockComponent.cs
  7. 0 0
      Server/Model/Message/InnerMessage.cs
  8. 1 1
      Server/Model/Module/Actor/ActorMessageDispatherComponent.cs
  9. 1 1
      Server/Model/Module/Network/MessageDispatherComponent.cs
  10. 4 2
      Server/Model/Server.Model.csproj
  11. 6 0
      Server/Model/Server.Model.csproj.user
  12. 5 0
      Unity/Assets/Scripts/Base/Log.cs
  13. 1 1
      Unity/Assets/Scripts/Base/Message/ClientDispatcher.cs
  14. 10 2
      Unity/Assets/Scripts/Base/Object/Component.cs
  15. 1 1
      Unity/Assets/Scripts/Component/BundleDownloaderComponent.cs
  16. 1 1
      Unity/Assets/Scripts/Component/MoveComponent.cs
  17. 2 0
      Unity/Assets/Scripts/Component/NetworkComponent.cs
  18. 5 5
      Unity/Assets/Scripts/Component/OpcodeTypeComponent.cs
  19. 0 4
      Unity/Assets/Scripts/Entity/Message/Opcode.cs
  20. 0 52
      Unity/Assets/Scripts/Entity/Message/OuterMessage.cs
  21. 38 8
      Unity/Assets/Scripts/Entity/Session.cs
  22. 13 0
      Unity/Assets/Scripts/Helper/DllHelper.cs
  23. 20 8
      Unity/Assets/Scripts/Helper/SessionHelper.cs
  24. 2 1
      Unity/Assets/Scripts/Init.cs
  25. 9 0
      Unity/Assets/ThirdParty/ILRuntime/Generated.meta
  26. 92 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/CLRBindings.cs
  27. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/CLRBindings.cs.meta
  28. 53 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_AEventAttribute_Binding.cs
  29. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_AEventAttribute_Binding.cs.meta
  30. 53 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_ActionHelper_Binding.cs
  31. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_ActionHelper_Binding.cs.meta
  32. 60 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Actor_TestRequest_Binding.cs
  33. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Actor_TestRequest_Binding.cs.meta
  34. 60 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Actor_Test_Binding.cs
  35. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Actor_Test_Binding.cs.meta
  36. 60 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Actor_TransferRequest_Binding.cs
  37. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Actor_TransferRequest_Binding.cs.meta
  38. 47 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_C2G_EnterMap_Binding.cs
  39. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_C2G_EnterMap_Binding.cs.meta
  40. 46 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_CanvasConfig_Binding.cs
  41. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_CanvasConfig_Binding.cs.meta
  42. 46 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Define_Binding.cs
  43. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Define_Binding.cs.meta
  44. 51 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Disposer_Binding.cs
  45. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Disposer_Binding.cs.meta
  46. 47 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_DllHelper_Binding.cs
  47. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_DllHelper_Binding.cs.meta
  48. 118 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_DoubleMap_2_UInt16_Type_Binding.cs
  49. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_DoubleMap_2_UInt16_Type_Binding.cs.meta
  50. 74 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_EntityFactory_Binding.cs
  51. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_EntityFactory_Binding.cs.meta
  52. 183 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Entity_Binding.cs
  53. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Entity_Binding.cs.meta
  54. 78 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_GameObjectHelper_Binding.cs
  55. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_GameObjectHelper_Binding.cs.meta
  56. 47 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Game_Binding.cs
  57. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Game_Binding.cs.meta
  58. 57 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_GlobalConfigComponent_Binding.cs
  59. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_GlobalConfigComponent_Binding.cs.meta
  60. 46 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_GlobalProto_Binding.cs
  61. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_GlobalProto_Binding.cs.meta
  62. 51 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_IStart_Binding.cs
  63. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_IStart_Binding.cs.meta
  64. 49 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_IdGenerater_Binding.cs
  65. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_IdGenerater_Binding.cs.meta
  66. 84 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Log_Binding.cs
  67. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Log_Binding.cs.meta
  68. 53 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_MessageAttribute_Binding.cs
  69. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_MessageAttribute_Binding.cs.meta
  70. 53 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_MessageHandlerAttribute_Binding.cs
  71. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_MessageHandlerAttribute_Binding.cs.meta
  72. 50 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_MongoHelper_Binding.cs
  73. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_MongoHelper_Binding.cs.meta
  74. 54 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_NetworkComponent_Binding.cs
  75. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_NetworkComponent_Binding.cs.meta
  76. 55 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_NetworkHelper_Binding.cs
  77. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_NetworkHelper_Binding.cs.meta
  78. 80 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_PacketInfo_Binding.cs
  79. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_PacketInfo_Binding.cs.meta
  80. 46 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_PlayerComponent_Binding.cs
  81. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_PlayerComponent_Binding.cs.meta
  82. 79 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_ProtobufHelper_Binding.cs
  83. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_ProtobufHelper_Binding.cs.meta
  84. 124 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_ResourcesComponent_Binding.cs
  85. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_ResourcesComponent_Binding.cs.meta
  86. 47 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Scene_Binding.cs
  87. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Scene_Binding.cs.meta
  88. 57 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_SessionComponent_Binding.cs
  89. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_SessionComponent_Binding.cs.meta
  90. 78 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_SessionHelper_Binding.cs
  91. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_SessionHelper_Binding.cs.meta
  92. 84 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Session_Binding.cs
  93. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Session_Binding.cs.meta
  94. 53 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_UIFactoryAttribute_Binding.cs
  95. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/Model_UIFactoryAttribute_Binding.cs.meta
  96. 53 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/ProtoBuf_PType_Binding.cs
  97. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/ProtoBuf_PType_Binding.cs.meta
  98. 79 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/ReferenceCollector_Binding.cs
  99. 12 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/ReferenceCollector_Binding.cs.meta
  100. 55 0
      Unity/Assets/ThirdParty/ILRuntime/Generated/System_Activator_Binding.cs

+ 3 - 3
Server/Hotfix/Module/Actor/ActorComponentSystem.cs

@@ -34,7 +34,7 @@ namespace Hotfix
 			self.entityActorHandler = new CommonEntityActorHandler();
 			self.queue = new Queue<ActorMessageInfo>();
 			self.actorId = self.Parent.Id;
-			Game.Scene.GetComponent<ActorManagerComponent>().Add(self.Parent);
+			Game.Scene.GetComponent<ActorManagerComponent>().Add((Entity)self.Parent);
 			self.HandleAsync();
 		}
 
@@ -43,7 +43,7 @@ namespace Hotfix
 			self.entityActorHandler = iEntityActorHandler;
 			self.queue = new Queue<ActorMessageInfo>();
 			self.actorId = self.Parent.Id;
-			Game.Scene.GetComponent<ActorManagerComponent>().Add(self.Parent);
+			Game.Scene.GetComponent<ActorManagerComponent>().Add((Entity)self.Parent);
 			self.HandleAsync();
 		}
 
@@ -104,7 +104,7 @@ namespace Hotfix
 					{
 						return;
 					}
-					await self.entityActorHandler.Handle(info.Session, self.Parent, info.RpcId, info.Message);
+					await self.entityActorHandler.Handle(info.Session, (Entity)self.Parent, info.RpcId, info.Message);
 				}
 				catch (Exception e)
 				{

+ 1 - 1
Server/Hotfix/Module/Network/InnerMessageDispatcher.cs

@@ -8,7 +8,7 @@ namespace Hotfix
 		public void Dispatch(Session session, PacketInfo packetInfo)
 		{
 			Type messageType = Game.Scene.GetComponent<OpcodeTypeComponent>().GetType(packetInfo.Header.Opcode);
-			IMessage message = (IMessage)session.network.MessagePacker.DeserializeFrom(messageType, packetInfo.Bytes, packetInfo.Index, packetInfo.Length);
+			IMessage message = (IMessage)session.Network.MessagePacker.DeserializeFrom(messageType, packetInfo.Bytes, packetInfo.Index, packetInfo.Length);
 
 			// 收到actor rpc request
 			if (message is ActorRequest actorRpcRequest)

+ 2 - 2
Server/Hotfix/Module/Network/NetInnerComponentSystem.cs

@@ -29,7 +29,7 @@ namespace Hotfix
 			self.Awake(NetworkProtocol.TCP);
 			self.MessagePacker = new MongoPacker();
 			self.MessageDispatcher = new InnerMessageDispatcher();
-			self.AppType = self.Parent.GetComponent<StartConfigComponent>().StartConfig.AppType;
+			self.AppType = self.Entity.GetComponent<StartConfigComponent>().StartConfig.AppType;
 		}
 
 		public static void Awake(this NetInnerComponent self, IPEndPoint ipEndPoint)
@@ -37,7 +37,7 @@ namespace Hotfix
 			self.Awake(NetworkProtocol.TCP, ipEndPoint);
 			self.MessagePacker = new MongoPacker();
 			self.MessageDispatcher = new InnerMessageDispatcher();
-			self.AppType = self.Parent.GetComponent<StartConfigComponent>().StartConfig.AppType;
+			self.AppType = self.Entity.GetComponent<StartConfigComponent>().StartConfig.AppType;
 		}
 
 		public static void Update(this NetInnerComponent self)

+ 1 - 1
Server/Hotfix/Module/Network/OuterMessageDispatcher.cs

@@ -8,7 +8,7 @@ namespace Hotfix
 		public async void Dispatch(Session session, PacketInfo packetInfo)
 		{
 			Type messageType = Game.Scene.GetComponent<OpcodeTypeComponent>().GetType(packetInfo.Header.Opcode);
-			IMessage message = (IMessage)session.network.MessagePacker.DeserializeFrom(messageType, packetInfo.Bytes, packetInfo.Index, packetInfo.Length);
+			IMessage message = (IMessage)session.Network.MessagePacker.DeserializeFrom(messageType, packetInfo.Bytes, packetInfo.Index, packetInfo.Length);
 
 			// gate session收到actor消息直接转发给actor自己去处理
 			if (message is IActorMessage)

+ 1 - 1
Server/Hotfix/System/RealmGateAddressComponentSystem.cs

@@ -15,7 +15,7 @@ namespace Hotfix
 	{
 		public static void Start(this RealmGateAddressComponent component)
 		{
-			StartConfig[] startConfigs = component.Parent.GetComponent<StartConfigComponent>().GetAll();
+			StartConfig[] startConfigs = component.Entity.GetComponent<StartConfigComponent>().GetAll();
 			foreach (StartConfig config in startConfigs)
 			{
 				if (!config.AppType.Is(AppType.Gate))

+ 1 - 1
Server/Model/Component/Unit/LockComponent.cs

@@ -53,7 +53,7 @@ namespace Model
 			this.status = LockStatus.LockRequesting;
 
 			// 真身直接本地请求锁,镜像需要调用Rpc获取锁
-			MasterComponent masterComponent = this.Parent.GetComponent<MasterComponent>();
+			MasterComponent masterComponent = this.Entity.GetComponent<MasterComponent>();
 			if (masterComponent != null)
 			{
 				await masterComponent.Lock(this.address);

+ 0 - 0
Server/Model/Entity/Message/InnerMessage.cs → Server/Model/Message/InnerMessage.cs


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

@@ -32,7 +32,7 @@ namespace Model
 
 		public void Load()
 		{
-			AppType appType = this.Parent.GetComponent<StartConfigComponent>().StartConfig.AppType;
+			AppType appType = this.Entity.GetComponent<StartConfigComponent>().StartConfig.AppType;
 			Log.Info("apptype: " + appType);
 			this.handlers = new Dictionary<Type, IMActorHandler>();
 

+ 1 - 1
Server/Model/Module/Network/MessageDispatherComponent.cs

@@ -31,7 +31,7 @@ namespace Model
 
 		public void Load()
 		{
-			AppType appType = this.Parent.GetComponent<StartConfigComponent>().StartConfig.AppType;
+			AppType appType = this.Entity.GetComponent<StartConfigComponent>().StartConfig.AppType;
 
 			this.handlers = new Dictionary<Type, List<IMHandler>>();
 			

+ 4 - 2
Server/Model/Server.Model.csproj

@@ -82,10 +82,12 @@
     <Compile Include="..\..\Unity\Assets\Scripts\Component\Config\OuterConfig.cs" Link="Component\Config\OuterConfig.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Component\NetworkComponent.cs" Link="Module\Network\NetworkComponent.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Component\TimerComponent.cs" Link="Component\TimerComponent.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Entity\Message\Opcode.cs" Link="Entity\Message\Opcode.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Entity\Message\OuterMessage.cs" Link="Entity\Message\OuterMessage.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Entity\Message\Opcode.cs" Link="Message\Opcode.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Entity\Message\OuterMessage.cs" Link="Message\OuterMessage.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Entity\Session.cs" Link="Module\Network\Session.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Helper\SessionHelper.cs" Link="Base\Helper\SessionHelper.cs" />
+    <Compile Include="..\..\Unity\Hotfix\Module\HotfixMessage\HotfixMessage.cs" Link="Message\HotfixMessage.cs" />
+    <Compile Include="..\..\Unity\Hotfix\Module\HotfixMessage\HotfixOpcode.cs" Link="Message\HotfixOpcode.cs" />
   </ItemGroup>
 
   <ItemGroup>

+ 6 - 0
Server/Model/Server.Model.csproj.user

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ShowAllFiles>false</ShowAllFiles>
+  </PropertyGroup>
+</Project>

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

@@ -5,6 +5,11 @@ namespace Model
 {
 	public static class Log
 	{
+		public static void Trace(string msg)
+		{
+			UnityEngine.Debug.Log(msg);
+		}
+
 		public static void Warning(string msg)
 		{
 			UnityEngine.Debug.LogWarning(msg);

+ 1 - 1
Unity/Assets/Scripts/Base/Message/ClientDispatcher.cs

@@ -7,7 +7,7 @@ namespace Model
 		public void Dispatch(Session session, PacketInfo packetInfo)
 		{
 			Type messageType = Game.Scene.GetComponent<OpcodeTypeComponent>().GetType(packetInfo.Header.Opcode);
-			IMessage message = (IMessage)session.network.MessagePacker.DeserializeFrom(messageType, packetInfo.Bytes, packetInfo.Index, packetInfo.Length);
+			IMessage message = (IMessage)session.Network.MessagePacker.DeserializeFrom(messageType, packetInfo.Bytes, packetInfo.Index, packetInfo.Length);
 
 			// 如果是帧同步消息,交给ClientFrameComponent处理
 			FrameMessage frameMessage = message as FrameMessage;

+ 10 - 2
Unity/Assets/Scripts/Base/Object/Component.cs

@@ -6,13 +6,21 @@ namespace Model
 	public abstract partial class Component: Disposer
 	{
 		[BsonIgnore]
-		public Entity Parent { get; set; }
+		public Disposer Parent { get; set; }
 
-		public T GetParent<T>() where T : Entity
+		public T GetParent<T>() where T : Disposer
 		{
 			return this.Parent as T;
 		}
 
+		public Entity Entity
+		{
+			get
+			{
+				return this.Parent as Entity;
+			}
+		}
+
 		protected Component()
 		{
 			this.Id = 1;

+ 1 - 1
Unity/Assets/Scripts/Component/BundleDownloaderComponent.cs

@@ -209,7 +209,7 @@ namespace Model
 
 			base.Dispose();
 
-			this.Parent?.RemoveComponent<BundleDownloaderComponent>();
+			this.Entity?.RemoveComponent<BundleDownloaderComponent>();
 		}
 	}
 }

+ 1 - 1
Unity/Assets/Scripts/Component/MoveComponent.cs

@@ -93,7 +93,7 @@ namespace Model
 		public void Awake()
 		{
 			this.mainSpeed = this.AddSpeed(new Vector3());
-			this.animatorComponent = this.Parent.GetComponent<AnimatorComponent>();
+			this.animatorComponent = this.Entity.GetComponent<AnimatorComponent>();
 		}
 
 		public void Update()

+ 2 - 0
Unity/Assets/Scripts/Component/NetworkComponent.cs

@@ -74,6 +74,7 @@ namespace Model
 		{
 			AChannel channel = await this.Service.AcceptChannel();
 			Session session = EntityFactory.Create<Session, NetworkComponent, AChannel>(this, channel);
+			session.Parent = this;
 			channel.ErrorCallback += (c, e) => { this.Remove(session.Id); };
 			this.sessions.Add(session.Id, session);
 			return session;
@@ -106,6 +107,7 @@ namespace Model
 			{
 				AChannel channel = this.Service.ConnectChannel(ipEndPoint);
 				Session session = EntityFactory.Create<Session, NetworkComponent, AChannel>(this, channel);
+				session.Parent = this;
 				channel.ErrorCallback += (c, e) => { this.Remove(session.Id); };
 				this.sessions.Add(session.Id, session);
 				return session;

+ 5 - 5
Unity/Assets/Scripts/Component/OpcodeTypeComponent.cs

@@ -17,22 +17,22 @@ namespace Model
 
 		public void Awake()
 		{
-			Type[] monoTypes = DllHelper.GetMonoTypes();
-			foreach (Type monoType in monoTypes)
+			Type[] types = DllHelper.GetAllTypes();
+			foreach (Type type in types)
 			{
-				object[] attrs = monoType.GetCustomAttributes(typeof(MessageAttribute), false);
+				object[] attrs = type.GetCustomAttributes(typeof(MessageAttribute), false);
 				if (attrs.Length == 0)
 				{
 					continue;
 				}
-
+				
 				MessageAttribute messageAttribute = attrs[0] as MessageAttribute;
 				if (messageAttribute == null)
 				{
 					continue;
 				}
 
-				this.opcodeTypes.Add(messageAttribute.Opcode, monoType);
+				this.opcodeTypes.Add(messageAttribute.Opcode, type);
 			}
 		}
 

+ 0 - 4
Unity/Assets/Scripts/Entity/Message/Opcode.cs

@@ -2,10 +2,6 @@ namespace Model
 {
 	public static partial class Opcode
 	{
-		 public const ushort C2R_Login = 101;
-		 public const ushort R2C_Login = 102;
-		 public const ushort C2G_LoginGate = 103;
-		 public const ushort G2C_LoginGate = 104;
 		 public const ushort Actor_Test = 105;
 		 public const ushort Actor_TestRequest = 106;
 		 public const ushort Actor_TestResponse = 107;

+ 0 - 52
Unity/Assets/Scripts/Entity/Message/OuterMessage.cs

@@ -4,57 +4,6 @@ using Model;
 using MongoDB.Bson.Serialization.Attributes;
 namespace Model
 {
-	[Message(Opcode.C2R_Login)]
-	[ProtoContract]
-	public partial class C2R_Login: MessageObject, IRequest
-	{
-		[ProtoMember(1, IsRequired = true)]
-		public string Account;
-
-		[ProtoMember(2, IsRequired = true)]
-		public string Password;
-	}
-
-	[Message(Opcode.R2C_Login)]
-	[ProtoContract]
-	public partial class R2C_Login : MessageObject, IResponse
-	{
-		[ProtoMember(1, IsRequired = true)]
-		public string Address;
-
-		[ProtoMember(2, IsRequired = true)]
-		public long Key;
-
-		[ProtoMember(90, IsRequired = true)]
-		public int Error { get; set; }
-
-		[ProtoMember(91, IsRequired = true)]
-		public string Message { get; set; }
-	}
-
-	[Message(Opcode.C2G_LoginGate)]
-	[ProtoContract]
-	public partial class C2G_LoginGate : MessageObject, IRequest
-	{
-		[ProtoMember(1, IsRequired = true)]
-		public long Key;
-
-	}
-
-	[Message(Opcode.G2C_LoginGate)]
-	[ProtoContract]
-	public partial class G2C_LoginGate : MessageObject, IResponse
-	{
-		[ProtoMember(1, IsRequired = true)]
-		public long PlayerId;
-
-		[ProtoMember(90, IsRequired = true)]
-		public int Error { get; set; }
-
-		[ProtoMember(91, IsRequired = true)]
-		public string Message { get; set; }
-	}
-
 	[Message(Opcode.Actor_Test)]
 	[ProtoContract]
 	public partial class Actor_Test : MessageObject, IActorMessage
@@ -97,7 +46,6 @@ namespace Model
 	{
 		[ProtoMember(1, IsRequired = true)]
 		public int MapIndex;
-
 	}
 
 	[Message(Opcode.Actor_TransferResponse)]

+ 38 - 8
Unity/Assets/Scripts/Entity/Session.cs

@@ -24,16 +24,22 @@ namespace Model
 	public sealed class Session : Entity
 	{
 		private static uint RpcId { get; set; }
-		public NetworkComponent network;
 		private AChannel channel;
-		
+
 		private readonly Dictionary<uint, Action<PacketInfo>> requestCallback = new Dictionary<uint, Action<PacketInfo>>();
 		
 		private readonly List<byte[]> byteses = new List<byte[]>() {new byte[0], new byte[0], new byte[0]};
 
+		public NetworkComponent Network
+		{
+			get
+			{
+				return this.GetParent<NetworkComponent>();
+			}
+		}
+
 		public void Awake(NetworkComponent net, AChannel c)
 		{
-			this.network = net;
 			this.channel = c;
 			this.requestCallback.Clear();
 		}
@@ -60,7 +66,7 @@ namespace Model
 			}
 
 			this.channel.Dispose();
-			this.network.Remove(id);
+			this.Network.Remove(id);
 			this.requestCallback.Clear();
 		}
 
@@ -120,12 +126,12 @@ namespace Model
 			if (packet.Length < Packet.MinSize)
 			{
 				Log.Error($"message error length < {Packet.MinSize}, ip: {this.RemoteAddress}");
-				this.network.Remove(this.Id);
+				this.Network.Remove(this.Id);
 				return;
 			}
 
 			ushort headerSize = BitConverter.ToUInt16(packet.Bytes, 0);
-			Header header = this.network.MessagePacker.DeserializeFrom<Header>(packet.Bytes, 2, headerSize);
+			Header header = this.Network.MessagePacker.DeserializeFrom<Header>(packet.Bytes, 2, headerSize);
 			byte flag = header.Flag;
 			PacketInfo packetInfo = new PacketInfo
 			{
@@ -149,7 +155,7 @@ namespace Model
 				return;
 			}
 
-			this.network.MessageDispatcher.Dispatch(this, packetInfo);
+			this.Network.MessageDispatcher.Dispatch(this, packetInfo);
 		}
 
 		public Task<PacketInfo> Call(ushort opcode, byte[] bytes)
@@ -226,13 +232,37 @@ namespace Model
 				Flag = flag
 			};
 
-			byte[] headerBytes = this.network.MessagePacker.SerializeToByteArray(header);
+			byte[] headerBytes = this.Network.MessagePacker.SerializeToByteArray(header);
 			byte[] headerLength = BitConverter.GetBytes((ushort)headerBytes.Length);
 
 			this.byteses[0] = headerLength;
 			this.byteses[1] = headerBytes;
 			this.byteses[2] = bytes;
+
+#if SERVER
+			// 如果是allserver,内部消息不走网络,直接转给session,方便调试时看到整体堆栈
+			if (this.Network.AppType == AppType.AllServer)
+			{
+				Session session = this.Network.Entity.GetComponent<NetInnerComponent>().Get(this.RemoteAddress);
+				this.packet.Length = 0;
+				ushort index = 0;
+				foreach (var byts in this.byteses)
+				{
+					Array.Copy(byts, 0, this.packet.Bytes, index, byts.Length);
+					index += (ushort)byts.Length;
+				}
+
+				this.packet.Length = index;
+				session.Run(packet);
+				return;
+			}
+#endif
+
 			channel.Send(this.byteses);
 		}
+
+#if SERVER
+		private Packet packet = new Packet(ushort.MaxValue);
+#endif
 	}
 }

+ 13 - 0
Unity/Assets/Scripts/Helper/DllHelper.cs

@@ -61,6 +61,19 @@ namespace Model
 			{
 				types.AddRange(assembly.GetTypes());
 			}
+			
+			return types.ToArray();
+		}
+
+		public static Type[] GetAllTypes()
+		{
+			List<Type> types = new List<Type>();
+			foreach (Assembly assembly in Game.EventSystem.GetAll())
+			{
+				types.AddRange(assembly.GetTypes());
+			}
+
+			types.AddRange(GetHotfixTypes());
 			return types.ToArray();
 		}
 

+ 20 - 8
Unity/Assets/Scripts/Helper/SessionHelper.cs

@@ -10,29 +10,41 @@ namespace Model
 		{
 			OpcodeTypeComponent opcodeTypeComponent = Game.Scene.GetComponent<OpcodeTypeComponent>();
 			ushort opcode = opcodeTypeComponent.GetOpcode(request.GetType());
-			byte[] bytes = session.network.MessagePacker.SerializeToByteArray(request);
+			byte[] bytes = session.Network.MessagePacker.SerializeToByteArray(request);
 			PacketInfo packetInfo = await session.Call(opcode, bytes);
 			Type responseType = opcodeTypeComponent.GetType(packetInfo.Header.Opcode);
-			object message = session.network.MessagePacker.DeserializeFrom(responseType, packetInfo.Bytes, packetInfo.Index, packetInfo.Length);
-			return (IResponse) message;
+			object message = session.Network.MessagePacker.DeserializeFrom(responseType, packetInfo.Bytes, packetInfo.Index, packetInfo.Length);
+			IResponse response = (IResponse) message;
+			if (response.Error > 100)
+			{
+				throw new RpcException(response.Error, response.Message);
+			}
+
+			return response;
 		}
 
 		public static async Task<IResponse> Call(this Session session, IRequest request, CancellationToken cancellationToken)
 		{
 			OpcodeTypeComponent opcodeTypeComponent = Game.Scene.GetComponent<OpcodeTypeComponent>();
 			ushort opcode = opcodeTypeComponent.GetOpcode(request.GetType());
-			byte[] bytes = session.network.MessagePacker.SerializeToByteArray(request);
+			byte[] bytes = session.Network.MessagePacker.SerializeToByteArray(request);
 			PacketInfo packetInfo = await session.Call(opcode, bytes, cancellationToken);
 			Type responseType = opcodeTypeComponent.GetType(packetInfo.Header.Opcode);
-			object message = session.network.MessagePacker.DeserializeFrom(responseType, packetInfo.Bytes, packetInfo.Index, packetInfo.Length);
-			return (IResponse)message;
+			object message = session.Network.MessagePacker.DeserializeFrom(responseType, packetInfo.Bytes, packetInfo.Index, packetInfo.Length);
+			IResponse response = (IResponse)message;
+			if (response.Error > 100)
+			{
+				throw new RpcException(response.Error, response.Message);
+			}
+
+			return response;
 		}
 
 		public static void Send(this Session session, IMessage message)
 		{
 			OpcodeTypeComponent opcodeTypeComponent = Game.Scene.GetComponent<OpcodeTypeComponent>();
 			ushort opcode = opcodeTypeComponent.GetOpcode(message.GetType());
-			byte[] bytes = session.network.MessagePacker.SerializeToByteArray(message);
+			byte[] bytes = session.Network.MessagePacker.SerializeToByteArray(message);
 			session.Send(opcode, bytes);
 		}
 
@@ -40,7 +52,7 @@ namespace Model
 		{
 			OpcodeTypeComponent opcodeTypeComponent = Game.Scene.GetComponent<OpcodeTypeComponent>();
 			ushort opcode = opcodeTypeComponent.GetOpcode(message.GetType());
-			byte[] bytes = session.network.MessagePacker.SerializeToByteArray(message);
+			byte[] bytes = session.Network.MessagePacker.SerializeToByteArray(message);
 			session.Reply(opcode, rpcId, bytes);
 		}
 	}

+ 2 - 1
Unity/Assets/Scripts/Init.cs

@@ -38,7 +38,6 @@ namespace Model
 				Game.EventSystem.Add(DLLType.Model, typeof(Init).Assembly);
 
 				Game.Scene.AddComponent<GlobalConfigComponent>();
-				Game.Scene.AddComponent<OpcodeTypeComponent>();
 				Game.Scene.AddComponent<NetOuterComponent>();
 				Game.Scene.AddComponent<ResourcesComponent>();
 				Game.Scene.AddComponent<BehaviorTreeComponent>();
@@ -82,6 +81,8 @@ namespace Model
 				this.onApplicationQuit = new MonoStaticMethod(hotfixInit, "OnApplicationQuit");
 #endif
 
+				Game.Scene.AddComponent<OpcodeTypeComponent>();
+
 				// 进入热更新层
 				this.start.Run();
 			}

+ 9 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 4b6cb67e0636d0b4ba21c0a44f5ed308
+folderAsset: yes
+timeCreated: 1517835495
+licenseType: Free
+DefaultImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 92 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/CLRBindings.cs

@@ -0,0 +1,92 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+
+namespace ILRuntime.Runtime.Generated
+{
+    class CLRBindings
+    {
+        /// <summary>
+        /// Initialize the CLR binding, please invoke this AFTER CLR Redirection registration
+        /// </summary>
+        public static void Initialize(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            System_String_Binding.Register(app);
+            Model_Define_Binding.Register(app);
+            System_Exception_Binding.Register(app);
+            System_Collections_IDictionary_Binding.Register(app);
+            System_Object_Binding.Register(app);
+            Model_IdGenerater_Binding.Register(app);
+            Model_Log_Binding.Register(app);
+            System_Collections_Generic_HashSet_1_ILTypeInstance_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding.Register(app);
+            System_Type_Binding.Register(app);
+            System_Reflection_MemberInfo_Binding.Register(app);
+            System_Linq_Enumerable_Binding.Register(app);
+            System_Collections_Generic_Queue_1_ILTypeInstance_Binding.Register(app);
+            Model_IStart_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_Int32_List_1_Object_Binding.Register(app);
+            System_Collections_Generic_List_1_Object_Binding.Register(app);
+            System_Collections_Generic_List_1_Object_Binding_Enumerator_Binding.Register(app);
+            System_IDisposable_Binding.Register(app);
+            Model_DllHelper_Binding.Register(app);
+            System_Activator_Binding.Register(app);
+            Model_AEventAttribute_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_Type_Queue_1_ILTypeInstance_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_UInt16_List_1_ILTypeInstance_Binding.Register(app);
+            Model_MessageHandlerAttribute_Binding.Register(app);
+            System_Collections_Generic_List_1_ILTypeInstance_Binding.Register(app);
+            System_Collections_Generic_List_1_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
+            Model_MessageAttribute_Binding.Register(app);
+            Model_DoubleMap_2_UInt16_Type_Binding.Register(app);
+            ProtoBuf_PType_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_UIType_ILTypeInstance_Binding.Register(app);
+            UnityEngine_GameObject_Binding.Register(app);
+            Model_UIFactoryAttribute_Binding.Register(app);
+            Model_CanvasConfig_Binding.Register(app);
+            Model_GameObjectHelper_Binding.Register(app);
+            UnityEngine_Transform_Binding.Register(app);
+            System_Collections_Generic_List_1_UIType_Binding.Register(app);
+            Model_Disposer_Binding.Register(app);
+            Model_Scene_Binding.Register(app);
+            Model_ProtobufHelper_Binding.Register(app);
+            Model_Session_Binding.Register(app);
+            System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_ILTypeInstance_Binding.Register(app);
+            System_Threading_Tasks_Task_1_PacketInfo_Binding.Register(app);
+            System_Runtime_CompilerServices_TaskAwaiter_1_PacketInfo_Binding.Register(app);
+            Model_PacketInfo_Binding.Register(app);
+            System_BitConverter_Binding.Register(app);
+            UnityEngine_Object_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding_ValueCollection_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding_ValueCollection_Binding_Enumerator_Binding.Register(app);
+            UnityEngine_Component_Binding.Register(app);
+            Model_Game_Binding.Register(app);
+            ReferenceCollector_Binding.Register(app);
+            UnityEngine_UI_Button_Binding.Register(app);
+            Model_ActionHelper_Binding.Register(app);
+            Model_SessionComponent_Binding.Register(app);
+            Model_Actor_Test_Binding.Register(app);
+            Model_SessionHelper_Binding.Register(app);
+            System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Binding.Register(app);
+            Model_Actor_TestRequest_Binding.Register(app);
+            System_Threading_Tasks_Task_1_IResponse_Binding.Register(app);
+            System_Runtime_CompilerServices_TaskAwaiter_1_IResponse_Binding.Register(app);
+            Model_MongoHelper_Binding.Register(app);
+            Model_Actor_TransferRequest_Binding.Register(app);
+            Model_C2G_EnterMap_Binding.Register(app);
+            Model_Entity_Binding.Register(app);
+            Model_ResourcesComponent_Binding.Register(app);
+            UnityEngine_LayerMask_Binding.Register(app);
+            Model_GlobalConfigComponent_Binding.Register(app);
+            Model_GlobalProto_Binding.Register(app);
+            Model_NetworkHelper_Binding.Register(app);
+            UnityEngine_UI_InputField_Binding.Register(app);
+            Model_NetworkComponent_Binding.Register(app);
+            System_Threading_Tasks_Task_1_ILTypeInstance_Binding.Register(app);
+            System_Runtime_CompilerServices_TaskAwaiter_1_ILTypeInstance_Binding.Register(app);
+            Model_EntityFactory_Binding.Register(app);
+            Model_PlayerComponent_Binding.Register(app);
+        }
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/CLRBindings.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 777defee4c58efe4ab78f0c6a1914a33
+timeCreated: 1517835495
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_AEventAttribute_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.AEventAttribute);
+            args = new Type[]{};
+            method = type.GetMethod("get_Type", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_Type_0);
+
+
+        }
+
+
+        static StackObject* get_Type_0(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);
+            Model.AEventAttribute instance_of_this_method;
+            instance_of_this_method = (Model.AEventAttribute)typeof(Model.AEventAttribute).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.Type;
+
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_AEventAttribute_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8f62889409d7a404c83b1a9eaa0e37f2
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_ActionHelper_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.ActionHelper);
+            args = new Type[]{typeof(UnityEngine.UI.Button.ButtonClickedEvent), typeof(System.Action)};
+            method = type.GetMethod("Add", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Add_0);
+
+
+        }
+
+
+        static StackObject* Add_0(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.Action action = (System.Action)typeof(System.Action).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            UnityEngine.UI.Button.ButtonClickedEvent buttonClickedEvent = (UnityEngine.UI.Button.ButtonClickedEvent)typeof(UnityEngine.UI.Button.ButtonClickedEvent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            Model.ActionHelper.Add(buttonClickedEvent, action);
+
+            return __ret;
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_ActionHelper_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d83e74584d2a31c42b4bc276efc804dc
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 60 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Actor_TestRequest_Binding.cs

@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_Actor_TestRequest_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.Actor_TestRequest);
+
+            field = type.GetField("request", flag);
+            app.RegisterCLRFieldGetter(field, get_request_0);
+            app.RegisterCLRFieldSetter(field, set_request_0);
+
+            args = new Type[]{};
+            method = type.GetConstructor(flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Ctor_0);
+
+        }
+
+
+
+        static object get_request_0(ref object o)
+        {
+            return ((Model.Actor_TestRequest)o).request;
+        }
+        static void set_request_0(ref object o, object v)
+        {
+            ((Model.Actor_TestRequest)o).request = (System.String)v;
+        }
+
+        static StackObject* Ctor_0(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, 0);
+
+            var result_of_this_method = new Model.Actor_TestRequest();
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Actor_TestRequest_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 13c04635d86e57340939904b11f6635c
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 60 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Actor_Test_Binding.cs

@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_Actor_Test_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.Actor_Test);
+
+            field = type.GetField("Info", flag);
+            app.RegisterCLRFieldGetter(field, get_Info_0);
+            app.RegisterCLRFieldSetter(field, set_Info_0);
+
+            args = new Type[]{};
+            method = type.GetConstructor(flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Ctor_0);
+
+        }
+
+
+
+        static object get_Info_0(ref object o)
+        {
+            return ((Model.Actor_Test)o).Info;
+        }
+        static void set_Info_0(ref object o, object v)
+        {
+            ((Model.Actor_Test)o).Info = (System.String)v;
+        }
+
+        static StackObject* Ctor_0(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, 0);
+
+            var result_of_this_method = new Model.Actor_Test();
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Actor_Test_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 11848d2c9da6a254b984dbac18673b75
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 60 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Actor_TransferRequest_Binding.cs

@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_Actor_TransferRequest_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.Actor_TransferRequest);
+
+            field = type.GetField("MapIndex", flag);
+            app.RegisterCLRFieldGetter(field, get_MapIndex_0);
+            app.RegisterCLRFieldSetter(field, set_MapIndex_0);
+
+            args = new Type[]{};
+            method = type.GetConstructor(flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Ctor_0);
+
+        }
+
+
+
+        static object get_MapIndex_0(ref object o)
+        {
+            return ((Model.Actor_TransferRequest)o).MapIndex;
+        }
+        static void set_MapIndex_0(ref object o, object v)
+        {
+            ((Model.Actor_TransferRequest)o).MapIndex = (System.Int32)v;
+        }
+
+        static StackObject* Ctor_0(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, 0);
+
+            var result_of_this_method = new Model.Actor_TransferRequest();
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Actor_TransferRequest_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4f24f32a93a85c741bd9535aad972000
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 47 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_C2G_EnterMap_Binding.cs

@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_C2G_EnterMap_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.C2G_EnterMap);
+
+            args = new Type[]{};
+            method = type.GetConstructor(flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Ctor_0);
+
+        }
+
+
+
+        static StackObject* Ctor_0(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, 0);
+
+            var result_of_this_method = new Model.C2G_EnterMap();
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_C2G_EnterMap_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9c28261cc0b20fd429bd6e008049a497
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 46 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_CanvasConfig_Binding.cs

@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_CanvasConfig_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.CanvasConfig);
+
+            field = type.GetField("CanvasName", flag);
+            app.RegisterCLRFieldGetter(field, get_CanvasName_0);
+            app.RegisterCLRFieldSetter(field, set_CanvasName_0);
+
+
+        }
+
+
+
+        static object get_CanvasName_0(ref object o)
+        {
+            return ((Model.CanvasConfig)o).CanvasName;
+        }
+        static void set_CanvasName_0(ref object o, object v)
+        {
+            ((Model.CanvasConfig)o).CanvasName = (System.String)v;
+        }
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_CanvasConfig_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 36e7aaf04275cf148a97aa01c18b9702
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 46 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Define_Binding.cs

@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_Define_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.Define);
+
+            field = type.GetField("IsILRuntime", flag);
+            app.RegisterCLRFieldGetter(field, get_IsILRuntime_0);
+            app.RegisterCLRFieldSetter(field, set_IsILRuntime_0);
+
+
+        }
+
+
+
+        static object get_IsILRuntime_0(ref object o)
+        {
+            return Model.Define.IsILRuntime;
+        }
+        static void set_IsILRuntime_0(ref object o, object v)
+        {
+            Model.Define.IsILRuntime = (System.Boolean)v;
+        }
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Define_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 79f3f2b50dc8fa44c92ce3439b75cc6e
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 51 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Disposer_Binding.cs

@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_Disposer_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.Disposer);
+            args = new Type[]{};
+            method = type.GetMethod("Dispose", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Dispose_0);
+
+
+        }
+
+
+        static StackObject* Dispose_0(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);
+            Model.Disposer instance_of_this_method;
+            instance_of_this_method = (Model.Disposer)typeof(Model.Disposer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Dispose();
+
+            return __ret;
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Disposer_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1a3e3f53ee659a84795c62344a9c58ec
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 47 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_DllHelper_Binding.cs

@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_DllHelper_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.DllHelper);
+            args = new Type[]{};
+            method = type.GetMethod("GetHotfixTypes", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, GetHotfixTypes_0);
+
+
+        }
+
+
+        static StackObject* GetHotfixTypes_0(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, 0);
+
+            var result_of_this_method = Model.DllHelper.GetHotfixTypes();
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_DllHelper_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f2d87ce105286ec4182a52d9c18f32f9
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 118 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_DoubleMap_2_UInt16_Type_Binding.cs

@@ -0,0 +1,118 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_DoubleMap_2_UInt16_Type_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.DoubleMap<System.UInt16, System.Type>);
+            args = new Type[]{typeof(System.UInt16), typeof(System.Type)};
+            method = type.GetMethod("Add", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Add_0);
+            args = new Type[]{typeof(System.Type)};
+            method = type.GetMethod("GetKeyByValue", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, GetKeyByValue_1);
+            args = new Type[]{typeof(System.UInt16)};
+            method = type.GetMethod("GetValueByKey", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, GetValueByKey_2);
+
+            args = new Type[]{};
+            method = type.GetConstructor(flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Ctor_0);
+
+        }
+
+
+        static StackObject* Add_0(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, 3);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Type value = (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.UInt16 key = (ushort)ptr_of_this_method->Value;
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            Model.DoubleMap<System.UInt16, System.Type> instance_of_this_method;
+            instance_of_this_method = (Model.DoubleMap<System.UInt16, System.Type>)typeof(Model.DoubleMap<System.UInt16, System.Type>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Add(key, value);
+
+            return __ret;
+        }
+
+        static StackObject* GetKeyByValue_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, 2);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Type value = (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);
+            Model.DoubleMap<System.UInt16, System.Type> instance_of_this_method;
+            instance_of_this_method = (Model.DoubleMap<System.UInt16, System.Type>)typeof(Model.DoubleMap<System.UInt16, System.Type>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.GetKeyByValue(value);
+
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+        static StackObject* GetValueByKey_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.UInt16 key = (ushort)ptr_of_this_method->Value;
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            Model.DoubleMap<System.UInt16, System.Type> instance_of_this_method;
+            instance_of_this_method = (Model.DoubleMap<System.UInt16, System.Type>)typeof(Model.DoubleMap<System.UInt16, System.Type>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.GetValueByKey(key);
+
+            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);
+        }
+
+
+        static StackObject* Ctor_0(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, 0);
+
+            var result_of_this_method = new Model.DoubleMap<System.UInt16, System.Type>();
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_DoubleMap_2_UInt16_Type_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 23fdfc71b7a705348b10cca3fc719835
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 74 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_EntityFactory_Binding.cs

@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_EntityFactory_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.EntityFactory);
+            Dictionary<string, List<MethodInfo>> genericMethods = new Dictionary<string, List<MethodInfo>>();
+            List<MethodInfo> lst = null;                    
+            foreach(var m in type.GetMethods())
+            {
+                if(m.IsGenericMethodDefinition)
+                {
+                    if (!genericMethods.TryGetValue(m.Name, out lst))
+                    {
+                        lst = new List<MethodInfo>();
+                        genericMethods[m.Name] = lst;
+                    }
+                    lst.Add(m);
+                }
+            }
+            args = new Type[]{typeof(Model.Player)};
+            if (genericMethods.TryGetValue("CreateWithId", out lst))
+            {
+                foreach(var m in lst)
+                {
+                    if(m.GetParameters().Length == 1)
+                    {
+                        method = m.MakeGenericMethod(args);
+                        app.RegisterCLRMethodRedirection(method, CreateWithId_0);
+
+                        break;
+                    }
+                }
+            }
+
+
+        }
+
+
+        static StackObject* CreateWithId_0(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.Int64 id = *(long*)&ptr_of_this_method->Value;
+
+            var result_of_this_method = Model.EntityFactory.CreateWithId<Model.Player>(id);
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_EntityFactory_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9e640ca89c3a5ac4b9492d51715d2a5f
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 183 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Entity_Binding.cs

@@ -0,0 +1,183 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_Entity_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.Entity);
+            Dictionary<string, List<MethodInfo>> genericMethods = new Dictionary<string, List<MethodInfo>>();
+            List<MethodInfo> lst = null;                    
+            foreach(var m in type.GetMethods())
+            {
+                if(m.IsGenericMethodDefinition)
+                {
+                    if (!genericMethods.TryGetValue(m.Name, out lst))
+                    {
+                        lst = new List<MethodInfo>();
+                        genericMethods[m.Name] = lst;
+                    }
+                    lst.Add(m);
+                }
+            }
+            args = new Type[]{typeof(Model.ResourcesComponent)};
+            if (genericMethods.TryGetValue("GetComponent", out lst))
+            {
+                foreach(var m in lst)
+                {
+                    if(m.GetParameters().Length == 0)
+                    {
+                        method = m.MakeGenericMethod(args);
+                        app.RegisterCLRMethodRedirection(method, GetComponent_0);
+
+                        break;
+                    }
+                }
+            }
+            args = new Type[]{typeof(Model.NetOuterComponent)};
+            if (genericMethods.TryGetValue("GetComponent", out lst))
+            {
+                foreach(var m in lst)
+                {
+                    if(m.GetParameters().Length == 0)
+                    {
+                        method = m.MakeGenericMethod(args);
+                        app.RegisterCLRMethodRedirection(method, GetComponent_1);
+
+                        break;
+                    }
+                }
+            }
+            args = new Type[]{typeof(Model.SessionComponent)};
+            if (genericMethods.TryGetValue("AddComponent", out lst))
+            {
+                foreach(var m in lst)
+                {
+                    if(m.GetParameters().Length == 0)
+                    {
+                        method = m.MakeGenericMethod(args);
+                        app.RegisterCLRMethodRedirection(method, AddComponent_2);
+
+                        break;
+                    }
+                }
+            }
+            args = new Type[]{typeof(Model.PlayerComponent)};
+            if (genericMethods.TryGetValue("GetComponent", out lst))
+            {
+                foreach(var m in lst)
+                {
+                    if(m.GetParameters().Length == 0)
+                    {
+                        method = m.MakeGenericMethod(args);
+                        app.RegisterCLRMethodRedirection(method, GetComponent_3);
+
+                        break;
+                    }
+                }
+            }
+
+
+        }
+
+
+        static StackObject* GetComponent_0(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);
+            Model.Entity instance_of_this_method;
+            instance_of_this_method = (Model.Entity)typeof(Model.Entity).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.GetComponent<Model.ResourcesComponent>();
+
+            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);
+        }
+
+        static StackObject* GetComponent_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);
+            Model.Entity instance_of_this_method;
+            instance_of_this_method = (Model.Entity)typeof(Model.Entity).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.GetComponent<Model.NetOuterComponent>();
+
+            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);
+        }
+
+        static StackObject* AddComponent_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, 1);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            Model.Entity instance_of_this_method;
+            instance_of_this_method = (Model.Entity)typeof(Model.Entity).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.AddComponent<Model.SessionComponent>();
+
+            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);
+        }
+
+        static StackObject* GetComponent_3(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);
+            Model.Entity instance_of_this_method;
+            instance_of_this_method = (Model.Entity)typeof(Model.Entity).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.GetComponent<Model.PlayerComponent>();
+
+            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);
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Entity_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2f9e9d6d9b638424bba42796c589f222
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 78 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_GameObjectHelper_Binding.cs

@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_GameObjectHelper_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.GameObjectHelper);
+            Dictionary<string, List<MethodInfo>> genericMethods = new Dictionary<string, List<MethodInfo>>();
+            List<MethodInfo> lst = null;                    
+            foreach(var m in type.GetMethods())
+            {
+                if(m.IsGenericMethodDefinition)
+                {
+                    if (!genericMethods.TryGetValue(m.Name, out lst))
+                    {
+                        lst = new List<MethodInfo>();
+                        genericMethods[m.Name] = lst;
+                    }
+                    lst.Add(m);
+                }
+            }
+            args = new Type[]{typeof(UnityEngine.GameObject)};
+            if (genericMethods.TryGetValue("Get", out lst))
+            {
+                foreach(var m in lst)
+                {
+                    if(m.GetParameters().Length == 2)
+                    {
+                        method = m.MakeGenericMethod(args);
+                        app.RegisterCLRMethodRedirection(method, Get_0);
+
+                        break;
+                    }
+                }
+            }
+
+
+        }
+
+
+        static StackObject* Get_0(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.String key = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            UnityEngine.GameObject gameObject = (UnityEngine.GameObject)typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = Model.GameObjectHelper.Get<UnityEngine.GameObject>(gameObject, key);
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_GameObjectHelper_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b82441bb7400e1a4e938abf0a4b90ab2
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 47 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Game_Binding.cs

@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_Game_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.Game);
+            args = new Type[]{};
+            method = type.GetMethod("get_Scene", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_Scene_0);
+
+
+        }
+
+
+        static StackObject* get_Scene_0(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, 0);
+
+            var result_of_this_method = Model.Game.Scene;
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Game_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7c0abb843b8542046b1d6b2a1174227b
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 57 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_GlobalConfigComponent_Binding.cs

@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_GlobalConfigComponent_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.GlobalConfigComponent);
+
+            field = type.GetField("Instance", flag);
+            app.RegisterCLRFieldGetter(field, get_Instance_0);
+            app.RegisterCLRFieldSetter(field, set_Instance_0);
+            field = type.GetField("GlobalProto", flag);
+            app.RegisterCLRFieldGetter(field, get_GlobalProto_1);
+            app.RegisterCLRFieldSetter(field, set_GlobalProto_1);
+
+
+        }
+
+
+
+        static object get_Instance_0(ref object o)
+        {
+            return Model.GlobalConfigComponent.Instance;
+        }
+        static void set_Instance_0(ref object o, object v)
+        {
+            Model.GlobalConfigComponent.Instance = (Model.GlobalConfigComponent)v;
+        }
+        static object get_GlobalProto_1(ref object o)
+        {
+            return ((Model.GlobalConfigComponent)o).GlobalProto;
+        }
+        static void set_GlobalProto_1(ref object o, object v)
+        {
+            ((Model.GlobalConfigComponent)o).GlobalProto = (Model.GlobalProto)v;
+        }
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_GlobalConfigComponent_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b2002296a558a844f80965dadb97c4c2
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 46 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_GlobalProto_Binding.cs

@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_GlobalProto_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.GlobalProto);
+
+            field = type.GetField("Address", flag);
+            app.RegisterCLRFieldGetter(field, get_Address_0);
+            app.RegisterCLRFieldSetter(field, set_Address_0);
+
+
+        }
+
+
+
+        static object get_Address_0(ref object o)
+        {
+            return ((Model.GlobalProto)o).Address;
+        }
+        static void set_Address_0(ref object o, object v)
+        {
+            ((Model.GlobalProto)o).Address = (System.String)v;
+        }
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_GlobalProto_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 494e27b054ccbab4a8c9806d72178a24
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 51 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_IStart_Binding.cs

@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_IStart_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.IStart);
+            args = new Type[]{};
+            method = type.GetMethod("Start", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Start_0);
+
+
+        }
+
+
+        static StackObject* Start_0(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);
+            Model.IStart instance_of_this_method;
+            instance_of_this_method = (Model.IStart)typeof(Model.IStart).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Start();
+
+            return __ret;
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_IStart_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e83a699523130dc4ba27f88bcee23169
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 49 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_IdGenerater_Binding.cs

@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_IdGenerater_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.IdGenerater);
+            args = new Type[]{};
+            method = type.GetMethod("GenerateId", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, GenerateId_0);
+
+
+        }
+
+
+        static StackObject* GenerateId_0(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, 0);
+
+            var result_of_this_method = Model.IdGenerater.GenerateId();
+
+            __ret->ObjectType = ObjectTypes.Long;
+            *(long*)&__ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_IdGenerater_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0eee5e785adde134083cc8867b758e37
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 84 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Log_Binding.cs

@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_Log_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.Log);
+            args = new Type[]{typeof(System.String)};
+            method = type.GetMethod("Error", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Error_0);
+            args = new Type[]{typeof(System.String)};
+            method = type.GetMethod("Debug", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Debug_1);
+            args = new Type[]{typeof(System.String)};
+            method = type.GetMethod("Info", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Info_2);
+
+
+        }
+
+
+        static StackObject* Error_0(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.String msg = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            Model.Log.Error(msg);
+
+            return __ret;
+        }
+
+        static StackObject* Debug_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.String msg = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            Model.Log.Debug(msg);
+
+            return __ret;
+        }
+
+        static StackObject* Info_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, 1);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.String msg = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            Model.Log.Info(msg);
+
+            return __ret;
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Log_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e8924b173f7f3c740aee5cdb51bf0142
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_MessageAttribute_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.MessageAttribute);
+            args = new Type[]{};
+            method = type.GetMethod("get_Opcode", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_Opcode_0);
+
+
+        }
+
+
+        static StackObject* get_Opcode_0(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);
+            Model.MessageAttribute instance_of_this_method;
+            instance_of_this_method = (Model.MessageAttribute)typeof(Model.MessageAttribute).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.Opcode;
+
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_MessageAttribute_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c4109e9ad7c17c94bbc99188bb2f4f3d
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_MessageHandlerAttribute_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.MessageHandlerAttribute);
+            args = new Type[]{};
+            method = type.GetMethod("get_Opcode", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_Opcode_0);
+
+
+        }
+
+
+        static StackObject* get_Opcode_0(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);
+            Model.MessageHandlerAttribute instance_of_this_method;
+            instance_of_this_method = (Model.MessageHandlerAttribute)typeof(Model.MessageHandlerAttribute).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.Opcode;
+
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_MessageHandlerAttribute_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 23504b1d8aefb6441846b0cd8cf75f10
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 50 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_MongoHelper_Binding.cs

@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_MongoHelper_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.MongoHelper);
+            args = new Type[]{typeof(System.Object)};
+            method = type.GetMethod("ToJson", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, ToJson_0);
+
+
+        }
+
+
+        static StackObject* ToJson_0(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.Object obj = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = Model.MongoHelper.ToJson(obj);
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_MongoHelper_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c589ee8d331249746b9c75343dfb79a4
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 54 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_NetworkComponent_Binding.cs

@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_NetworkComponent_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.NetworkComponent);
+            args = new Type[]{typeof(System.Net.IPEndPoint)};
+            method = type.GetMethod("Create", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Create_0);
+
+
+        }
+
+
+        static StackObject* Create_0(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.Net.IPEndPoint ipEndPoint = (System.Net.IPEndPoint)typeof(System.Net.IPEndPoint).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            Model.NetworkComponent instance_of_this_method;
+            instance_of_this_method = (Model.NetworkComponent)typeof(Model.NetworkComponent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.Create(ipEndPoint);
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_NetworkComponent_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6f070752a9a23c4439bb7d7e4151b225
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 55 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_NetworkHelper_Binding.cs

@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_NetworkHelper_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.NetworkHelper);
+            args = new Type[]{typeof(System.String)};
+            method = type.GetMethod("ToIPEndPoint", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, ToIPEndPoint_0);
+
+
+        }
+
+
+        static StackObject* ToIPEndPoint_0(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.String address = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = Model.NetworkHelper.ToIPEndPoint(address);
+
+            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);
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_NetworkHelper_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 184570f6a315d4e4bb4176c55a68ec32
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 80 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_PacketInfo_Binding.cs

@@ -0,0 +1,80 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_PacketInfo_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.PacketInfo);
+
+            app.RegisterCLRCreateDefaultInstance(type, () => new Model.PacketInfo());
+
+
+        }
+
+        static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList<object> __mStack, ref Model.PacketInfo instance_of_this_method)
+        {
+            ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
+            switch(ptr_of_this_method->ObjectType)
+            {
+                case ObjectTypes.Object:
+                    {
+                        __mStack[ptr_of_this_method->Value] = instance_of_this_method;
+                    }
+                    break;
+                case ObjectTypes.FieldReference:
+                    {
+                        var ___obj = __mStack[ptr_of_this_method->Value];
+                        if(___obj is ILTypeInstance)
+                        {
+                            ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = instance_of_this_method;
+                        }
+                        else
+                        {
+                            var t = __domain.GetType(___obj.GetType()) as CLRType;
+                            t.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, instance_of_this_method);
+                        }
+                    }
+                    break;
+                case ObjectTypes.StaticFieldReference:
+                    {
+                        var t = __domain.GetType(ptr_of_this_method->Value);
+                        if(t is ILType)
+                        {
+                            ((ILType)t).StaticInstance[ptr_of_this_method->ValueLow] = instance_of_this_method;
+                        }
+                        else
+                        {
+                            ((CLRType)t).SetStaticFieldValue(ptr_of_this_method->ValueLow, instance_of_this_method);
+                        }
+                    }
+                    break;
+                 case ObjectTypes.ArrayReference:
+                    {
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as Model.PacketInfo[];
+                        instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method;
+                    }
+                    break;
+            }
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_PacketInfo_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f3a43917235fe4844866e2dde8eb73f1
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 46 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_PlayerComponent_Binding.cs

@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_PlayerComponent_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.PlayerComponent);
+
+            field = type.GetField("MyPlayer", flag);
+            app.RegisterCLRFieldGetter(field, get_MyPlayer_0);
+            app.RegisterCLRFieldSetter(field, set_MyPlayer_0);
+
+
+        }
+
+
+
+        static object get_MyPlayer_0(ref object o)
+        {
+            return ((Model.PlayerComponent)o).MyPlayer;
+        }
+        static void set_MyPlayer_0(ref object o, object v)
+        {
+            ((Model.PlayerComponent)o).MyPlayer = (Model.Player)v;
+        }
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_PlayerComponent_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 16758829642b962429791d6d8c401a98
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 79 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_ProtobufHelper_Binding.cs

@@ -0,0 +1,79 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_ProtobufHelper_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.ProtobufHelper);
+            args = new Type[]{typeof(System.Object)};
+            method = type.GetMethod("ToBytes", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, ToBytes_0);
+            args = new Type[]{typeof(System.Type), typeof(System.Byte[]), typeof(System.Int32), typeof(System.Int32)};
+            method = type.GetMethod("FromBytes", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, FromBytes_1);
+
+
+        }
+
+
+        static StackObject* ToBytes_0(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.Object message = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = Model.ProtobufHelper.ToBytes(message);
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+        static StackObject* FromBytes_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, 4);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Int32 length = ptr_of_this_method->Value;
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Int32 index = ptr_of_this_method->Value;
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            System.Byte[] bytes = (System.Byte[])typeof(System.Byte[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
+            System.Type type = (System.Type)typeof(System.Type).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = Model.ProtobufHelper.FromBytes(type, bytes, index, length);
+
+            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, true);
+            }
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true);
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_ProtobufHelper_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 050713c7279a2314aa39901f5c833e9a
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 124 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_ResourcesComponent_Binding.cs

@@ -0,0 +1,124 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_ResourcesComponent_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.ResourcesComponent);
+            args = new Type[]{typeof(System.String)};
+            method = type.GetMethod("LoadBundle", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, LoadBundle_0);
+            Dictionary<string, List<MethodInfo>> genericMethods = new Dictionary<string, List<MethodInfo>>();
+            List<MethodInfo> lst = null;                    
+            foreach(var m in type.GetMethods())
+            {
+                if(m.IsGenericMethodDefinition)
+                {
+                    if (!genericMethods.TryGetValue(m.Name, out lst))
+                    {
+                        lst = new List<MethodInfo>();
+                        genericMethods[m.Name] = lst;
+                    }
+                    lst.Add(m);
+                }
+            }
+            args = new Type[]{typeof(UnityEngine.GameObject)};
+            if (genericMethods.TryGetValue("GetAsset", out lst))
+            {
+                foreach(var m in lst)
+                {
+                    if(m.GetParameters().Length == 2)
+                    {
+                        method = m.MakeGenericMethod(args);
+                        app.RegisterCLRMethodRedirection(method, GetAsset_1);
+
+                        break;
+                    }
+                }
+            }
+            args = new Type[]{typeof(System.String)};
+            method = type.GetMethod("UnloadBundle", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, UnloadBundle_2);
+
+
+        }
+
+
+        static StackObject* LoadBundle_0(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.String assetBundleName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            Model.ResourcesComponent instance_of_this_method;
+            instance_of_this_method = (Model.ResourcesComponent)typeof(Model.ResourcesComponent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.LoadBundle(assetBundleName);
+
+            return __ret;
+        }
+
+        static StackObject* GetAsset_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, 3);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.String prefab = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.String bundleName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            Model.ResourcesComponent instance_of_this_method;
+            instance_of_this_method = (Model.ResourcesComponent)typeof(Model.ResourcesComponent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.GetAsset<UnityEngine.GameObject>(bundleName, prefab);
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+        static StackObject* UnloadBundle_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.String assetBundleName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            Model.ResourcesComponent instance_of_this_method;
+            instance_of_this_method = (Model.ResourcesComponent)typeof(Model.ResourcesComponent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.UnloadBundle(assetBundleName);
+
+            return __ret;
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_ResourcesComponent_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2d3a98382f8078144a06592bdde2cdd0
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 47 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Scene_Binding.cs

@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_Scene_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.Scene);
+
+            args = new Type[]{};
+            method = type.GetConstructor(flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Ctor_0);
+
+        }
+
+
+
+        static StackObject* Ctor_0(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, 0);
+
+            var result_of_this_method = new Model.Scene();
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Scene_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1adb4abc5c33a2f40a0af6b79a9e7610
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 57 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_SessionComponent_Binding.cs

@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_SessionComponent_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.SessionComponent);
+
+            field = type.GetField("Instance", flag);
+            app.RegisterCLRFieldGetter(field, get_Instance_0);
+            app.RegisterCLRFieldSetter(field, set_Instance_0);
+            field = type.GetField("Session", flag);
+            app.RegisterCLRFieldGetter(field, get_Session_1);
+            app.RegisterCLRFieldSetter(field, set_Session_1);
+
+
+        }
+
+
+
+        static object get_Instance_0(ref object o)
+        {
+            return Model.SessionComponent.Instance;
+        }
+        static void set_Instance_0(ref object o, object v)
+        {
+            Model.SessionComponent.Instance = (Model.SessionComponent)v;
+        }
+        static object get_Session_1(ref object o)
+        {
+            return ((Model.SessionComponent)o).Session;
+        }
+        static void set_Session_1(ref object o, object v)
+        {
+            ((Model.SessionComponent)o).Session = (Model.Session)v;
+        }
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_SessionComponent_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8880ca769ac4c2a49a4f6bc64522462f
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 78 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_SessionHelper_Binding.cs

@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_SessionHelper_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.SessionHelper);
+            args = new Type[]{typeof(Model.Session), typeof(Model.IMessage)};
+            method = type.GetMethod("Send", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Send_0);
+            args = new Type[]{typeof(Model.Session), typeof(Model.IRequest)};
+            method = type.GetMethod("Call", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Call_1);
+
+
+        }
+
+
+        static StackObject* Send_0(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);
+            Model.IMessage message = (Model.IMessage)typeof(Model.IMessage).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            Model.Session session = (Model.Session)typeof(Model.Session).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            Model.SessionHelper.Send(session, message);
+
+            return __ret;
+        }
+
+        static StackObject* Call_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, 2);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            Model.IRequest request = (Model.IRequest)typeof(Model.IRequest).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            Model.Session session = (Model.Session)typeof(Model.Session).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = Model.SessionHelper.Call(session, request);
+
+            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);
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_SessionHelper_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ae32244b53ce535469554f1010841fed
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 84 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Session_Binding.cs

@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_Session_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.Session);
+            args = new Type[]{typeof(System.UInt16), typeof(System.Byte[])};
+            method = type.GetMethod("Send", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Send_0);
+            args = new Type[]{typeof(System.UInt16), typeof(System.Byte[])};
+            method = type.GetMethod("Call", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Call_1);
+
+
+        }
+
+
+        static StackObject* Send_0(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, 3);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Byte[] bytes = (System.Byte[])typeof(System.Byte[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.UInt16 opcode = (ushort)ptr_of_this_method->Value;
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            Model.Session instance_of_this_method;
+            instance_of_this_method = (Model.Session)typeof(Model.Session).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Send(opcode, bytes);
+
+            return __ret;
+        }
+
+        static StackObject* Call_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, 3);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Byte[] bytes = (System.Byte[])typeof(System.Byte[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.UInt16 opcode = (ushort)ptr_of_this_method->Value;
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            Model.Session instance_of_this_method;
+            instance_of_this_method = (Model.Session)typeof(Model.Session).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.Call(opcode, bytes);
+
+            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);
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_Session_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: df4b0cc6ab43ee841a5ab16333da50d3
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class Model_UIFactoryAttribute_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(Model.UIFactoryAttribute);
+            args = new Type[]{};
+            method = type.GetMethod("get_Type", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_Type_0);
+
+
+        }
+
+
+        static StackObject* get_Type_0(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);
+            Model.UIFactoryAttribute instance_of_this_method;
+            instance_of_this_method = (Model.UIFactoryAttribute)typeof(Model.UIFactoryAttribute).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.Type;
+
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_UIFactoryAttribute_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c25e1a6984dbbd54d8b9121c06aa1a54
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class ProtoBuf_PType_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(ProtoBuf.PType);
+            args = new Type[]{typeof(System.String), typeof(System.Type)};
+            method = type.GetMethod("RegisterType", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, RegisterType_0);
+
+
+        }
+
+
+        static StackObject* RegisterType_0(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 type = (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.String metaName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            ProtoBuf.PType.RegisterType(metaName, type);
+
+            return __ret;
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/ProtoBuf_PType_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8239250936e3a09458181c03a6e50183
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 79 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/ReferenceCollector_Binding.cs

@@ -0,0 +1,79 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class ReferenceCollector_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(ReferenceCollector);
+            Dictionary<string, List<MethodInfo>> genericMethods = new Dictionary<string, List<MethodInfo>>();
+            List<MethodInfo> lst = null;                    
+            foreach(var m in type.GetMethods())
+            {
+                if(m.IsGenericMethodDefinition)
+                {
+                    if (!genericMethods.TryGetValue(m.Name, out lst))
+                    {
+                        lst = new List<MethodInfo>();
+                        genericMethods[m.Name] = lst;
+                    }
+                    lst.Add(m);
+                }
+            }
+            args = new Type[]{typeof(UnityEngine.GameObject)};
+            if (genericMethods.TryGetValue("Get", out lst))
+            {
+                foreach(var m in lst)
+                {
+                    if(m.GetParameters().Length == 1)
+                    {
+                        method = m.MakeGenericMethod(args);
+                        app.RegisterCLRMethodRedirection(method, Get_0);
+
+                        break;
+                    }
+                }
+            }
+
+
+        }
+
+
+        static StackObject* Get_0(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.String key = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            ReferenceCollector instance_of_this_method;
+            instance_of_this_method = (ReferenceCollector)typeof(ReferenceCollector).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.Get<UnityEngine.GameObject>(key);
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+
+    }
+}

+ 12 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/ReferenceCollector_Binding.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 90c47d0bb7d709e418eabcfa1567e710
+timeCreated: 1517835576
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 55 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Activator_Binding.cs

@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class System_Activator_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(System.Activator);
+            args = new Type[]{typeof(System.Type)};
+            method = type.GetMethod("CreateInstance", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, CreateInstance_0);
+
+
+        }
+
+
+        static StackObject* CreateInstance_0(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.Type type = (System.Type)typeof(System.Type).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = System.Activator.CreateInstance(type);
+
+            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, true);
+            }
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true);
+        }
+
+
+
+    }
+}

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini