tanghai 3 лет назад
Родитель
Сommit
cbf0fa13b8
100 измененных файлов с 2781 добавлено и 1322 удалено
  1. 1 0
      Apps/Hotfix/Apps.Hotfix.csproj
  2. 26 25
      Apps/Hotfix/Module/Actor/ActorMessageDispatcherComponentSystem.cs
  3. 30 29
      Apps/Hotfix/Module/Actor/ActorMessageSenderComponentSystem.cs
  4. 2 0
      Apps/Hotfix/Module/ActorLocation/ActorLocationSenderComponentSystem.cs
  5. 17 15
      Apps/Hotfix/Module/Console/ConsoleComponentSystem.cs
  6. 1 0
      Apps/Hotfix/Module/DB/DBManagerComponentSystem.cs
  7. 35 34
      Apps/Hotfix/Module/Http/HttpComponentSystem.cs
  8. 35 35
      Apps/Hotfix/Module/MessageInner/NetInnerComponentSystem.cs
  9. 15 14
      Apps/Hotfix/Module/RobotCase/RobotCaseComponentSystem.cs
  10. 17 15
      Apps/Hotfix/Module/RobotCase/RobotCaseDispatcherComponentSystem.cs
  11. 2 0
      Apps/Hotfix/Server/AOI/AOIEntitySystem.cs
  12. 1 0
      Apps/Hotfix/Server/AOI/AOIHelper.cs
  13. 3 0
      Apps/Hotfix/Server/AOI/AOIManagerComponentSystem.cs
  14. 11 10
      Apps/Hotfix/Server/AOI/CellSystem.cs
  15. 11 2
      Apps/Hotfix/Server/AOI/ChangePosition_NotifyAOI.cs
  16. 17 10
      Apps/Hotfix/Server/PlayerComponentSystem.cs
  17. 2 0
      Apps/Hotfix/Server/Unit/UnitHelper.cs
  18. 13 12
      Apps/Hotfix/Watcher/WatcherComponentSystem.cs
  19. 1 0
      Apps/Hotfix/Watcher/WatcherHelper.cs
  20. 1 0
      Apps/Model/Apps.Model.csproj
  21. 0 0
      Apps/Model/Base/ConfigLoader.cs
  22. 1 1
      Apps/Model/Module/Actor/MailBoxComponent.cs
  23. 2 2
      Apps/Model/Module/ActorLocation/ActorLocationSenderComponent.cs
  24. 1 30
      Apps/Model/Server/PlayerComponent.cs
  25. 1 1
      Apps/Model/Server/Scene/GateMapComponent.cs
  26. 1 1
      Apps/Model/Server/SessionPlayerComponent.cs
  27. 1 1
      Apps/Model/Server/Unit/UnitGateComponent.cs
  28. 17 0
      ET.sln
  29. 222 0
      Share/Analyzer/Analyzer/AddChildTypeAnalyzer.cs
  30. 84 0
      Share/Analyzer/Analyzer/ClassDeclarationInHotfixAnalyzer.cs
  31. 58 0
      Share/Analyzer/Analyzer/EntityClassDeclarationAnalyzer.cs
  32. 167 0
      Share/Analyzer/Analyzer/EntityFiledAccessAnalyzer.cs
  33. 70 0
      Share/Analyzer/Analyzer/HotfixProjectFieldDeclarationAnalyzer.cs
  34. 10 0
      Share/Analyzer/AnalyzerGlobalSetting.cs
  35. 23 0
      Share/Analyzer/Config/AnalyzeAssembly.cs
  36. 10 0
      Share/Analyzer/Config/DiagnosticCategories.cs
  37. 17 0
      Share/Analyzer/Config/DiagnosticIds.cs
  38. 157 0
      Share/Analyzer/Extension/AnalyzerHelper.cs
  39. 24 0
      Share/Analyzer/Share.Analyzer.csproj
  40. 8 0
      Unity/Assets/Editor/AssetPostProcessor.meta
  41. 17 0
      Unity/Assets/Editor/AssetPostProcessor/OnGenerateCSProjectProcessor.cs
  42. 1 1
      Unity/Assets/Editor/AssetPostProcessor/OnGenerateCSProjectProcessor.cs.meta
  43. 57 53
      Unity/Assets/Mono/ILRuntime/Generate/CLRBindings.cs
  44. 19 37
      Unity/Assets/Mono/ILRuntime/Generate/ET_AService_Binding.cs
  45. 0 25
      Unity/Assets/Mono/ILRuntime/Generate/ET_ByteHelper_Binding.cs
  46. 10 10
      Unity/Assets/Mono/ILRuntime/Generate/ET_CodeLoader_Binding.cs
  47. 35 35
      Unity/Assets/Mono/ILRuntime/Generate/ET_ETAsyncTaskMethodBuilder_Binding.cs
  48. 43 43
      Unity/Assets/Mono/ILRuntime/Generate/ET_ETTask_1_Boolean_Binding.cs
  49. 18 0
      Unity/Assets/Mono/ILRuntime/Generate/ET_ETTask_1_ILTypeInstance_Binding.cs
  50. 40 40
      Unity/Assets/Mono/ILRuntime/Generate/ET_ETTask_Binding.cs
  51. 12 12
      Unity/Assets/Mono/ILRuntime/Generate/ET_Log_Binding.cs
  52. 53 0
      Unity/Assets/Mono/ILRuntime/Generate/ET_MathHelper_Binding.cs
  53. 1 1
      Unity/Assets/Mono/ILRuntime/Generate/ET_MathHelper_Binding.cs.meta
  54. 23 0
      Unity/Assets/Mono/ILRuntime/Generate/ET_RandomHelper_Binding.cs
  55. 128 0
      Unity/Assets/Mono/ILRuntime/Generate/ET_Recast_Binding.cs
  56. 11 0
      Unity/Assets/Mono/ILRuntime/Generate/ET_Recast_Binding.cs.meta
  57. 46 2
      Unity/Assets/Mono/ILRuntime/Generate/ET_StringHelper_Binding.cs
  58. 16 16
      Unity/Assets/Mono/ILRuntime/Generate/ET_ThreadSynchronizationContext_Binding.cs
  59. 13 13
      Unity/Assets/Mono/ILRuntime/Generate/ET_TimeInfo_Binding.cs
  60. 0 63
      Unity/Assets/Mono/ILRuntime/Generate/ET_UILayerScript_Binding.cs
  61. 80 0
      Unity/Assets/Mono/ILRuntime/Generate/LitJson_JsonMapper_Binding.cs
  62. 11 0
      Unity/Assets/Mono/ILRuntime/Generate/LitJson_JsonMapper_Binding.cs.meta
  63. 48 48
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_Binding.cs
  64. 0 23
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Int32_Int64_Binding.cs
  65. 18 18
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Int32_Transform_Binding.cs
  66. 67 67
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_Binding.cs
  67. 146 0
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_String_Int64_Binding.cs
  68. 11 0
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_String_Int64_Binding.cs.meta
  69. 34 12
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_List_1_ILTypeInstance_Binding.cs
  70. 17 17
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_List_1_Int64_Binding.cs
  71. 53 28
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_List_1_Vector3_Binding.cs
  72. 10 10
      Unity/Assets/Mono/ILRuntime/Generate/System_Func_2_String_Byte_Array_Binding.cs
  73. 11 0
      Unity/Assets/Mono/ILRuntime/Generate/System_Func_2_String_Byte_Array_Binding.cs.meta
  74. 8 8
      Unity/Assets/Mono/ILRuntime/Generate/System_IO_MemoryStream_Binding.cs
  75. 24 24
      Unity/Assets/Mono/ILRuntime/Generate/System_Linq_Enumerable_Binding.cs
  76. 15 15
      Unity/Assets/Mono/ILRuntime/Generate/System_Object_Binding.cs
  77. 77 0
      Unity/Assets/Mono/ILRuntime/Generate/System_Single_Binding.cs
  78. 11 0
      Unity/Assets/Mono/ILRuntime/Generate/System_Single_Binding.cs.meta
  79. 62 45
      Unity/Assets/Mono/ILRuntime/Generate/System_String_Binding.cs
  80. 12 12
      Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_AsyncOperation_Binding.cs
  81. 12 70
      Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_GameObject_Binding.cs
  82. 19 19
      Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_LayerMask_Binding.cs
  83. 44 4
      Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_Mathf_Binding.cs
  84. 60 26
      Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_Object_Binding.cs
  85. 19 41
      Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_Transform_Binding.cs
  86. 24 24
      Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_Vector3_Binding.cs
  87. 1 0
      Unity/Codes/Hotfix/Client/AI/XunLuoPathComponentSystem.cs
  88. 1 1
      Unity/Codes/Hotfix/Client/Login/EnterMapHelper.cs
  89. 34 33
      Unity/Codes/Hotfix/Client/Move/MoveComponentSystem.cs
  90. 1 1
      Unity/Codes/Hotfix/Client/Scene/SceneFactory.cs
  91. 15 14
      Unity/Codes/Hotfix/Client/Scene/ZoneSceneManagerComponentSystem.cs
  92. 1 1
      Unity/Codes/Hotfix/Client/Unit/M2C_CreateUnitsHandler.cs
  93. 2 2
      Unity/Codes/Hotfix/Client/Unit/UnitHelper.cs
  94. 31 30
      Unity/Codes/Hotfix/Module/AI/AIComponentSystem.cs
  95. 23 24
      Unity/Codes/Hotfix/Module/AI/AIDispatcherComponentSystem.cs
  96. 20 19
      Unity/Codes/Hotfix/Module/Config/ConfigComponentSystem.cs
  97. 26 25
      Unity/Codes/Hotfix/Module/Message/MessageDispatcherComponentSystem.cs
  98. 31 30
      Unity/Codes/Hotfix/Module/Message/NetKcpComponentSystem.cs
  99. 22 22
      Unity/Codes/Hotfix/Module/Message/NetThreadComponentSystem.cs
  100. 22 21
      Unity/Codes/Hotfix/Module/Message/SessionStreamDispatcherSystem.cs

+ 1 - 0
Apps/Hotfix/Apps.Hotfix.csproj

@@ -46,5 +46,6 @@
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\Model\Apps.Model.csproj" />
     <ProjectReference Include="..\Model\Apps.Model.csproj" />
+    <ProjectReference Include="..\..\Share\Analyzer\Share.Analyzer.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 26 - 25
Apps/Hotfix/Module/Actor/ActorMessageDispatcherComponentSystem.cs

@@ -2,40 +2,41 @@
 
 
 namespace ET
 namespace ET
 {
 {
-    [ObjectSystem]
-    public class ActorMessageDispatcherComponentAwakeSystem: AwakeSystem<ActorMessageDispatcherComponent>
+    /// <summary>
+    /// Actor消息分发组件
+    /// </summary>
+    [FriendClass(typeof(ActorMessageDispatcherComponent))]
+    public static class ActorMessageDispatcherComponentHelper
     {
     {
-        public override void Awake(ActorMessageDispatcherComponent self)
+        [ObjectSystem]
+        public class ActorMessageDispatcherComponentAwakeSystem: AwakeSystem<ActorMessageDispatcherComponent>
         {
         {
-            ActorMessageDispatcherComponent.Instance = self;
-            self.Awake();
+            public override void Awake(ActorMessageDispatcherComponent self)
+            {
+                ActorMessageDispatcherComponent.Instance = self;
+                self.Awake();
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class ActorMessageDispatcherComponentLoadSystem: LoadSystem<ActorMessageDispatcherComponent>
-    {
-        public override void Load(ActorMessageDispatcherComponent self)
+        [ObjectSystem]
+        public class ActorMessageDispatcherComponentLoadSystem: LoadSystem<ActorMessageDispatcherComponent>
         {
         {
-            self.Load();
+            public override void Load(ActorMessageDispatcherComponent self)
+            {
+                self.Load();
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class ActorMessageDispatcherComponentDestroySystem: DestroySystem<ActorMessageDispatcherComponent>
-    {
-        public override void Destroy(ActorMessageDispatcherComponent self)
+        [ObjectSystem]
+        public class ActorMessageDispatcherComponentDestroySystem: DestroySystem<ActorMessageDispatcherComponent>
         {
         {
-            self.ActorMessageHandlers.Clear();
-            ActorMessageDispatcherComponent.Instance = null;
+            public override void Destroy(ActorMessageDispatcherComponent self)
+            {
+                self.ActorMessageHandlers.Clear();
+                ActorMessageDispatcherComponent.Instance = null;
+            }
         }
         }
-    }
-
-    /// <summary>
-    /// Actor消息分发组件
-    /// </summary>
-    public static class ActorMessageDispatcherComponentHelper
-    {
+        
         public static void Awake(this ActorMessageDispatcherComponent self)
         public static void Awake(this ActorMessageDispatcherComponent self)
         {
         {
             self.Load();
             self.Load();

+ 30 - 29
Apps/Hotfix/Module/Actor/ActorMessageSenderComponentSystem.cs

@@ -3,47 +3,48 @@ using System.IO;
 
 
 namespace ET
 namespace ET
 {
 {
-    [Timer(TimerType.ActorMessageSenderChecker)]
-    public class ActorMessageSenderChecker: ATimer<ActorMessageSenderComponent>
+    [FriendClass(typeof(ActorMessageSenderComponent))]
+    public static class ActorMessageSenderComponentSystem
     {
     {
-        public override void Run(ActorMessageSenderComponent self)
+        [Timer(TimerType.ActorMessageSenderChecker)]
+        public class ActorMessageSenderChecker: ATimer<ActorMessageSenderComponent>
         {
         {
-            try
-            {
-                self.Check();
-            }
-            catch (Exception e)
+            public override void Run(ActorMessageSenderComponent self)
             {
             {
-                Log.Error($"move timer error: {self.Id}\n{e}");
+                try
+                {
+                    self.Check();
+                }
+                catch (Exception e)
+                {
+                    Log.Error($"move timer error: {self.Id}\n{e}");
+                }
             }
             }
         }
         }
-    }
     
     
-    [ObjectSystem]
-    public class ActorMessageSenderComponentAwakeSystem: AwakeSystem<ActorMessageSenderComponent>
-    {
-        public override void Awake(ActorMessageSenderComponent self)
+        [ObjectSystem]
+        public class ActorMessageSenderComponentAwakeSystem: AwakeSystem<ActorMessageSenderComponent>
         {
         {
-            ActorMessageSenderComponent.Instance = self;
+            public override void Awake(ActorMessageSenderComponent self)
+            {
+                ActorMessageSenderComponent.Instance = self;
 
 
-            self.TimeoutCheckTimer = TimerComponent.Instance.NewRepeatedTimer(1000, TimerType.ActorMessageSenderChecker, self);
+                self.TimeoutCheckTimer = TimerComponent.Instance.NewRepeatedTimer(1000, TimerType.ActorMessageSenderChecker, self);
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class ActorMessageSenderComponentDestroySystem: DestroySystem<ActorMessageSenderComponent>
-    {
-        public override void Destroy(ActorMessageSenderComponent self)
+        [ObjectSystem]
+        public class ActorMessageSenderComponentDestroySystem: DestroySystem<ActorMessageSenderComponent>
         {
         {
-            ActorMessageSenderComponent.Instance = null;
-            TimerComponent.Instance.Remove(ref self.TimeoutCheckTimer);
-            self.TimeoutCheckTimer = 0;
-            self.TimeoutActorMessageSenders.Clear();
+            public override void Destroy(ActorMessageSenderComponent self)
+            {
+                ActorMessageSenderComponent.Instance = null;
+                TimerComponent.Instance.Remove(ref self.TimeoutCheckTimer);
+                self.TimeoutCheckTimer = 0;
+                self.TimeoutActorMessageSenders.Clear();
+            }
         }
         }
-    }
-
-    public static class ActorMessageSenderComponentSystem
-    {
+        
         public static void Run(ActorMessageSender self, IActorResponse response)
         public static void Run(ActorMessageSender self, IActorResponse response)
         {
         {
             if (response.Error == ErrorCore.ERR_ActorTimeout)
             if (response.Error == ErrorCore.ERR_ActorTimeout)

+ 2 - 0
Apps/Hotfix/Module/ActorLocation/ActorLocationSenderComponentSystem.cs

@@ -42,6 +42,8 @@ namespace ET
         }
         }
     }
     }
 
 
+    [FriendClass(typeof(ActorLocationSenderComponent))]
+    [FriendClass(typeof(ActorLocationSender))]
     public static class ActorLocationSenderComponentSystem
     public static class ActorLocationSenderComponentSystem
     {
     {
         public static void Check(this ActorLocationSenderComponent self)
         public static void Check(this ActorLocationSenderComponent self)

+ 17 - 15
Apps/Hotfix/Module/Console/ConsoleComponentSystem.cs

@@ -5,28 +5,30 @@ using System.Threading.Tasks;
 
 
 namespace ET
 namespace ET
 {
 {
-    [ObjectSystem]
-    public class ConsoleComponentAwakeSystem: AwakeSystem<ConsoleComponent>
+    [FriendClass(typeof(ConsoleComponent))]
+    [FriendClass(typeof(ModeContex))]
+    public static class ConsoleComponentSystem
     {
     {
-        public override void Awake(ConsoleComponent self)
+        [ObjectSystem]
+        public class ConsoleComponentAwakeSystem: AwakeSystem<ConsoleComponent>
         {
         {
-            self.Load();
+            public override void Awake(ConsoleComponent self)
+            {
+                self.Load();
             
             
-            self.Start().Coroutine();
+                self.Start().Coroutine();
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class ConsoleComponentLoadSystem: LoadSystem<ConsoleComponent>
-    {
-        public override void Load(ConsoleComponent self)
+        [ObjectSystem]
+        public class ConsoleComponentLoadSystem: LoadSystem<ConsoleComponent>
         {
         {
-            self.Load();
+            public override void Load(ConsoleComponent self)
+            {
+                self.Load();
+            }
         }
         }
-    }
-
-    public static class ConsoleComponentSystem
-    {
+        
         public static void Load(this ConsoleComponent self)
         public static void Load(this ConsoleComponent self)
         {
         {
             self.Handlers.Clear();
             self.Handlers.Clear();

+ 1 - 0
Apps/Hotfix/Module/DB/DBManagerComponentSystem.cs

@@ -2,6 +2,7 @@
 
 
 namespace ET
 namespace ET
 {
 {
+    [FriendClass(typeof(DBManagerComponent))]
     public static class DBManagerComponentSystem
     public static class DBManagerComponentSystem
     {
     {
         [ObjectSystem]
         [ObjectSystem]

+ 35 - 34
Apps/Hotfix/Module/Http/HttpComponentSystem.cs

@@ -4,57 +4,58 @@ using System.Net;
 
 
 namespace ET
 namespace ET
 {
 {
-    public class HttpComponentAwakeSystem : AwakeSystem<HttpComponent, string>
+    [FriendClass(typeof(HttpComponent))]
+    public static class HttpComponentSystem
     {
     {
-        public override void Awake(HttpComponent self, string address)
+        public class HttpComponentAwakeSystem : AwakeSystem<HttpComponent, string>
         {
         {
-            try
+            public override void Awake(HttpComponent self, string address)
             {
             {
-                self.Load();
+                try
+                {
+                    self.Load();
                 
                 
-                self.Listener = new HttpListener();
+                    self.Listener = new HttpListener();
 
 
-                foreach (string s in address.Split(';'))
-                {
-                    if (s.Trim() == "")
+                    foreach (string s in address.Split(';'))
                     {
                     {
-                        continue;
+                        if (s.Trim() == "")
+                        {
+                            continue;
+                        }
+                        self.Listener.Prefixes.Add(s);
                     }
                     }
-                    self.Listener.Prefixes.Add(s);
-                }
 
 
-                self.Listener.Start();
+                    self.Listener.Start();
 
 
-                self.Accept().Coroutine();
-            }
-            catch (HttpListenerException e)
-            {
-                throw new Exception($"请现在cmd中运行: netsh http add urlacl url=http://*:你的address中的端口/ user=Everyone, address: {address}", e);
+                    self.Accept().Coroutine();
+                }
+                catch (HttpListenerException e)
+                {
+                    throw new Exception($"请现在cmd中运行: netsh http add urlacl url=http://*:你的address中的端口/ user=Everyone, address: {address}", e);
+                }
             }
             }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class HttpComponentLoadSystem: LoadSystem<HttpComponent>
-    {
-        public override void Load(HttpComponent self)
+        [ObjectSystem]
+        public class HttpComponentLoadSystem: LoadSystem<HttpComponent>
         {
         {
-            self.Load();
+            public override void Load(HttpComponent self)
+            {
+                self.Load();
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class HttpComponentDestroySystem: DestroySystem<HttpComponent>
-    {
-        public override void Destroy(HttpComponent self)
+        [ObjectSystem]
+        public class HttpComponentDestroySystem: DestroySystem<HttpComponent>
         {
         {
-            self.Listener.Stop();
-            self.Listener.Close();
+            public override void Destroy(HttpComponent self)
+            {
+                self.Listener.Stop();
+                self.Listener.Close();
+            }
         }
         }
-    }
-    
-    public static class HttpComponentSystem
-    {
+        
         public static void Load(this HttpComponent self)
         public static void Load(this HttpComponent self)
         {
         {
             self.dispatcher = new Dictionary<string, IHttpHandler>();
             self.dispatcher = new Dictionary<string, IHttpHandler>();

+ 35 - 35
Apps/Hotfix/Module/MessageInner/NetInnerComponentSystem.cs

@@ -1,56 +1,56 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
+using System.IO;
 using System.Net;
 using System.Net;
-using System.Threading;
 
 
 namespace ET
 namespace ET
 {
 {
-    [ObjectSystem]
-    public class NetInnerComponentAwakeSystem: AwakeSystem<NetInnerComponent, int>
+    [FriendClass(typeof(NetInnerComponent))]
+    [FriendClass(typeof(NetThreadComponent))]
+    public static class NetInnerComponentSystem
     {
     {
-        public override void Awake(NetInnerComponent self, int sessionStreamDispatcherType)
+        [ObjectSystem]
+        public class NetInnerComponentAwakeSystem: AwakeSystem<NetInnerComponent, int>
         {
         {
-            NetInnerComponent.Instance = self;
-            self.SessionStreamDispatcherType = sessionStreamDispatcherType;
+            public override void Awake(NetInnerComponent self, int sessionStreamDispatcherType)
+            {
+                NetInnerComponent.Instance = self;
+                self.SessionStreamDispatcherType = sessionStreamDispatcherType;
             
             
-            self.Service = new TService(NetThreadComponent.Instance.ThreadSynchronizationContext, ServiceType.Inner);
-            self.Service.ErrorCallback += self.OnError;
-            self.Service.ReadCallback += self.OnRead;
+                self.Service = new TService(NetThreadComponent.Instance.ThreadSynchronizationContext, ServiceType.Inner);
+                self.Service.ErrorCallback += self.OnError;
+                self.Service.ReadCallback += self.OnRead;
 
 
-            NetThreadComponent.Instance.Add(self.Service);
+                NetThreadComponent.Instance.Add(self.Service);
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class NetInnerComponentAwake1System: AwakeSystem<NetInnerComponent, IPEndPoint, int>
-    {
-        public override void Awake(NetInnerComponent self, IPEndPoint address, int sessionStreamDispatcherType)
+        [ObjectSystem]
+        public class NetInnerComponentAwake1System: AwakeSystem<NetInnerComponent, IPEndPoint, int>
         {
         {
-            NetInnerComponent.Instance = self;
-            self.SessionStreamDispatcherType = sessionStreamDispatcherType;
+            public override void Awake(NetInnerComponent self, IPEndPoint address, int sessionStreamDispatcherType)
+            {
+                NetInnerComponent.Instance = self;
+                self.SessionStreamDispatcherType = sessionStreamDispatcherType;
 
 
-            self.Service = new TService(NetThreadComponent.Instance.ThreadSynchronizationContext, address, ServiceType.Inner);
-            self.Service.ErrorCallback += self.OnError;
-            self.Service.ReadCallback += self.OnRead;
-            self.Service.AcceptCallback += self.OnAccept;
+                self.Service = new TService(NetThreadComponent.Instance.ThreadSynchronizationContext, address, ServiceType.Inner);
+                self.Service.ErrorCallback += self.OnError;
+                self.Service.ReadCallback += self.OnRead;
+                self.Service.AcceptCallback += self.OnAccept;
 
 
-            NetThreadComponent.Instance.Add(self.Service);
+                NetThreadComponent.Instance.Add(self.Service);
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class NetInnerComponentDestroySystem: DestroySystem<NetInnerComponent>
-    {
-        public override void Destroy(NetInnerComponent self)
+        [ObjectSystem]
+        public class NetInnerComponentDestroySystem: DestroySystem<NetInnerComponent>
         {
         {
-            NetThreadComponent.Instance.Remove(self.Service);
-            self.Service.Destroy();
+            public override void Destroy(NetInnerComponent self)
+            {
+                NetThreadComponent.Instance.Remove(self.Service);
+                self.Service.Destroy();
+            }
         }
         }
-    }
 
 
-    public static class NetInnerComponentSystem
-    {
+        
         public static void OnRead(this NetInnerComponent self, long channelId, MemoryStream memoryStream)
         public static void OnRead(this NetInnerComponent self, long channelId, MemoryStream memoryStream)
         {
         {
             Session session = self.GetChild<Session>(channelId);
             Session session = self.GetChild<Session>(channelId);

+ 15 - 14
Apps/Hotfix/Module/RobotCase/RobotCaseComponentSystem.cs

@@ -3,26 +3,27 @@ using System.Collections.Generic;
 
 
 namespace ET
 namespace ET
 {
 {
-    [ObjectSystem]
-    public class RobotCaseComponentAwakeSystem: AwakeSystem<RobotCaseComponent>
+    [FriendClass(typeof(RobotCaseComponent))]
+    public static class RobotCaseComponentSystem
     {
     {
-        public override void Awake(RobotCaseComponent self)
+        [ObjectSystem]
+        public class RobotCaseComponentAwakeSystem: AwakeSystem<RobotCaseComponent>
         {
         {
-            RobotCaseComponent.Instance = self;
+            public override void Awake(RobotCaseComponent self)
+            {
+                RobotCaseComponent.Instance = self;
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class RobotCaseComponentDestroySystem: DestroySystem<RobotCaseComponent>
-    {
-        public override void Destroy(RobotCaseComponent self)
+        [ObjectSystem]
+        public class RobotCaseComponentDestroySystem: DestroySystem<RobotCaseComponent>
         {
         {
-            RobotCaseComponent.Instance = null;
+            public override void Destroy(RobotCaseComponent self)
+            {
+                RobotCaseComponent.Instance = null;
+            }
         }
         }
-    }
-    
-    public static class RobotCaseComponentSystem
-    {
+        
         public static int GetN(this RobotCaseComponent self)
         public static int GetN(this RobotCaseComponent self)
         {
         {
             return ++self.N;
             return ++self.N;

+ 17 - 15
Apps/Hotfix/Module/RobotCase/RobotCaseDispatcherComponentSystem.cs

@@ -3,27 +3,29 @@ using System.Collections.Generic;
 
 
 namespace ET
 namespace ET
 {
 {
-    [ObjectSystem]
-    public class RobotCaseDispatcherComponentAwakeSystem: AwakeSystem<RobotCaseDispatcherComponent>
+    [FriendClass(typeof(RobotCaseDispatcherComponent))]
+    [FriendClass(typeof(RobotCase))]
+    public static class RobotCaseDispatcherComponentSystem
     {
     {
-        public override void Awake(RobotCaseDispatcherComponent self)
+        [ObjectSystem]
+        public class RobotCaseDispatcherComponentAwakeSystem: AwakeSystem<RobotCaseDispatcherComponent>
         {
         {
-            RobotCaseDispatcherComponent.Instance = self;
-            self.Load();
+            public override void Awake(RobotCaseDispatcherComponent self)
+            {
+                RobotCaseDispatcherComponent.Instance = self;
+                self.Load();
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class RobotCaseDispatcherComponentLoadSystem: LoadSystem<RobotCaseDispatcherComponent>
-    {
-        public override void Load(RobotCaseDispatcherComponent self)
+        [ObjectSystem]
+        public class RobotCaseDispatcherComponentLoadSystem: LoadSystem<RobotCaseDispatcherComponent>
         {
         {
-            self.Load();
+            public override void Load(RobotCaseDispatcherComponent self)
+            {
+                self.Load();
+            }
         }
         }
-    }
-    
-    public static class RobotCaseDispatcherComponentSystem
-    {
+        
         public static void Load(this RobotCaseDispatcherComponent self)
         public static void Load(this RobotCaseDispatcherComponent self)
         {
         {
             self.Dictionary.Clear();
             self.Dictionary.Clear();

+ 2 - 0
Apps/Hotfix/Server/AOI/AOIEntitySystem.cs

@@ -3,6 +3,8 @@ using UnityEngine;
 
 
 namespace ET.Server
 namespace ET.Server
 {
 {
+    [FriendClass(typeof(AOIEntity))]
+    [FriendClass(typeof(Cell))]
     public static class AOIEntitySystem
     public static class AOIEntitySystem
     {
     {
         [ObjectSystem]
         [ObjectSystem]

+ 1 - 0
Apps/Hotfix/Server/AOI/AOIHelper.cs

@@ -2,6 +2,7 @@
 
 
 namespace ET.Server
 namespace ET.Server
 {
 {
+    [FriendClass(typeof(AOIEntity))]
     public static class AOIHelper
     public static class AOIHelper
     {
     {
         public static long CreateCellId(int x, int y)
         public static long CreateCellId(int x, int y)

+ 3 - 0
Apps/Hotfix/Server/AOI/AOIManagerComponentSystem.cs

@@ -2,6 +2,9 @@
 
 
 namespace ET.Server
 namespace ET.Server
 {
 {
+    [FriendClass(typeof(AOIManagerComponent))]
+    [FriendClass(typeof(AOIEntity))]
+    [FriendClass(typeof(Cell))]
     public static class AOIManagerComponentSystem
     public static class AOIManagerComponentSystem
     {
     {
         public static void Add(this AOIManagerComponent self, AOIEntity aoiEntity, float x, float y)
         public static void Add(this AOIManagerComponent self, AOIEntity aoiEntity, float x, float y)

+ 11 - 10
Apps/Hotfix/Server/AOI/CellSystem.cs

@@ -3,21 +3,22 @@ using System.Text;
 
 
 namespace ET.Server
 namespace ET.Server
 {
 {
-    [ObjectSystem]
-    public class CellDestroySystem: DestroySystem<Cell>
+    [FriendClass(typeof(Cell))]
+    public static class CellSystem
     {
     {
-        public override void Destroy(Cell self)
+        [ObjectSystem]
+        public class CellDestroySystem: DestroySystem<Cell>
         {
         {
-            self.AOIUnits.Clear();
+            public override void Destroy(Cell self)
+            {
+                self.AOIUnits.Clear();
 
 
-            self.SubsEnterEntities.Clear();
+                self.SubsEnterEntities.Clear();
 
 
-            self.SubsLeaveEntities.Clear();
+                self.SubsLeaveEntities.Clear();
+            }
         }
         }
-    }
-
-    public static class CellSystem
-    {
+        
         public static void Add(this Cell self, AOIEntity aoiEntity)
         public static void Add(this Cell self, AOIEntity aoiEntity)
         {
         {
             self.AOIUnits.Add(aoiEntity.Id, aoiEntity);
             self.AOIUnits.Add(aoiEntity.Id, aoiEntity);

+ 11 - 2
Apps/Hotfix/Server/AOI/ChangePosition_NotifyAOI.cs

@@ -7,9 +7,17 @@ namespace ET.Server
     {
     {
         protected override async ETTask Run(ET.EventType.ChangePosition args)
         protected override async ETTask Run(ET.EventType.ChangePosition args)
         {
         {
-            await ETTask.CompletedTask;
-            Vector3 oldPos = args.OldPos;
             Unit unit = args.Unit;
             Unit unit = args.Unit;
+
+            // 机器人也有Unit,机器人的Unit在Current Scene
+            
+            if (unit.DomainScene().SceneType != SceneType.Map)
+            {
+                return;
+            }
+            
+            Vector3 oldPos = args.OldPos;
+            
             int oldCellX = (int) (oldPos.x * 1000) / AOIManagerComponent.CellSize;
             int oldCellX = (int) (oldPos.x * 1000) / AOIManagerComponent.CellSize;
             int oldCellY = (int) (oldPos.z * 1000) / AOIManagerComponent.CellSize;
             int oldCellY = (int) (oldPos.z * 1000) / AOIManagerComponent.CellSize;
             int newCellX = (int) (unit.Position.x * 1000) / AOIManagerComponent.CellSize;
             int newCellX = (int) (unit.Position.x * 1000) / AOIManagerComponent.CellSize;
@@ -26,6 +34,7 @@ namespace ET.Server
             }
             }
 
 
             unit.Domain.GetComponent<AOIManagerComponent>().Move(aoiEntity, newCellX, newCellY);
             unit.Domain.GetComponent<AOIManagerComponent>().Move(aoiEntity, newCellX, newCellY);
+            await ETTask.CompletedTask;
         }
         }
     }
     }
 }
 }

+ 17 - 10
Apps/Hotfix/Server/PlayerComponentSystem.cs

@@ -1,22 +1,29 @@
-using System;
+using System.Linq;
 
 
 namespace ET.Server
 namespace ET.Server
 {
 {
+    [FriendClass(typeof(PlayerComponent))]
     public static class PlayerComponentSystem
     public static class PlayerComponentSystem
     {
     {
-        public class AwakeSystem : AwakeSystem<PlayerComponent>
+        public static void Add(this PlayerComponent self, Player player)
         {
         {
-            public override void Awake(PlayerComponent self)
-            {
-            }
+            self.idPlayers.Add(player.Id, player);
         }
         }
 
 
-        [ObjectSystem]
-        public class PlayerComponentDestroySystem: DestroySystem<PlayerComponent>
+        public static Player Get(this PlayerComponent self, long id)
         {
         {
-            public override void Destroy(PlayerComponent self)
-            {
-            }
+            self.idPlayers.TryGetValue(id, out Player gamer);
+            return gamer;
+        }
+
+        public static void Remove(this PlayerComponent self, long id)
+        {
+            self.idPlayers.Remove(id);
+        }
+
+        public static Player[] GetAll(this PlayerComponent self)
+        {
+            return self.idPlayers.Values.ToArray();
         }
         }
     }
     }
 }
 }

+ 2 - 0
Apps/Hotfix/Server/Unit/UnitHelper.cs

@@ -3,6 +3,8 @@ using UnityEngine;
 
 
 namespace ET.Server
 namespace ET.Server
 {
 {
+    [FriendClass(typeof(MoveComponent))]
+    [FriendClass(typeof(NumericComponent))]
     public static class UnitHelper
     public static class UnitHelper
     {
     {
         public static UnitInfo CreateUnitInfo(Unit unit)
         public static UnitInfo CreateUnitInfo(Unit unit)

+ 13 - 12
Apps/Hotfix/Watcher/WatcherComponentSystem.cs

@@ -3,24 +3,25 @@ using System.Diagnostics;
 
 
 namespace ET
 namespace ET
 {
 {
-    public class WatcherComponentAwakeSystem: AwakeSystem<WatcherComponent>
+    [FriendClass(typeof(WatcherComponent))]
+    public static class WatcherComponentSystem
     {
     {
-        public override void Awake(WatcherComponent self)
+        public class WatcherComponentAwakeSystem: AwakeSystem<WatcherComponent>
         {
         {
-            WatcherComponent.Instance = self;
+            public override void Awake(WatcherComponent self)
+            {
+                WatcherComponent.Instance = self;
+            }
         }
         }
-    }
     
     
-    public class WatcherComponentDestroySystem: DestroySystem<WatcherComponent>
-    {
-        public override void Destroy(WatcherComponent self)
+        public class WatcherComponentDestroySystem: DestroySystem<WatcherComponent>
         {
         {
-            WatcherComponent.Instance = null;
+            public override void Destroy(WatcherComponent self)
+            {
+                WatcherComponent.Instance = null;
+            }
         }
         }
-    }
-    
-    public static class WatcherComponentSystem
-    {
+        
         public static void Start(this WatcherComponent self, int createScenes = 0)
         public static void Start(this WatcherComponent self, int createScenes = 0)
         {
         {
             string[] localIP = NetworkHelper.GetAddressIPs();
             string[] localIP = NetworkHelper.GetAddressIPs();

+ 1 - 0
Apps/Hotfix/Watcher/WatcherHelper.cs

@@ -44,6 +44,7 @@ namespace ET
             string arguments = $"Apps.dll" + 
             string arguments = $"Apps.dll" + 
                     $" --Process={startProcessConfig.Id}" +
                     $" --Process={startProcessConfig.Id}" +
                     $" --AppType=Server" +  
                     $" --AppType=Server" +  
+                    $" --StartConfig={Game.Options.StartConfig}" +
                     $" --Develop={Game.Options.Develop}" +
                     $" --Develop={Game.Options.Develop}" +
                     $" --CreateScenes={createScenes}" +
                     $" --CreateScenes={createScenes}" +
                     $" --LogLevel={Game.Options.LogLevel}";
                     $" --LogLevel={Game.Options.LogLevel}";

+ 1 - 0
Apps/Model/Apps.Model.csproj

@@ -91,5 +91,6 @@
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\ThirdParty\Apps.ThirdParty.csproj" />
     <ProjectReference Include="..\ThirdParty\Apps.ThirdParty.csproj" />
+    <ProjectReference Include="..\..\Share\Analyzer\Share.Analyzer.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 0 - 0
Apps/Hotfix/Config/ConfigLoader.cs → Apps/Model/Base/ConfigLoader.cs


+ 1 - 1
Apps/Model/Module/Actor/MailBoxComponent.cs

@@ -6,6 +6,6 @@
     public class MailBoxComponent: Entity, IAwake, IAwake<MailboxType>
     public class MailBoxComponent: Entity, IAwake, IAwake<MailboxType>
     {
     {
         // Mailbox的类型
         // Mailbox的类型
-        public MailboxType MailboxType;
+        public MailboxType MailboxType { get; set; }
     }
     }
 }
 }

+ 2 - 2
Apps/Model/Module/ActorLocation/ActorLocationSenderComponent.cs

@@ -1,10 +1,10 @@
-using System.Collections.Generic;
+using System.Collections.Generic;
 
 
 namespace ET
 namespace ET
 {
 {
     public class ActorLocationSenderComponent: Entity, IAwake, IDestroy
     public class ActorLocationSenderComponent: Entity, IAwake, IDestroy
     {
     {
-        public static long TIMEOUT_TIME = 60 * 1000;
+        public const long TIMEOUT_TIME = 60 * 1000;
 
 
         public static ActorLocationSenderComponent Instance { get; set; }
         public static ActorLocationSenderComponent Instance { get; set; }
 
 

+ 1 - 30
Apps/Model/Server/PlayerComponent.cs

@@ -5,35 +5,6 @@ namespace ET.Server
 {
 {
 	public class PlayerComponent : Entity, IAwake, IDestroy
 	public class PlayerComponent : Entity, IAwake, IDestroy
 	{
 	{
-		private readonly Dictionary<long, Player> idPlayers = new Dictionary<long, Player>();
-		
-		public void Add(Player player)
-		{
-			this.idPlayers.Add(player.Id, player);
-		}
-
-		public Player Get(long id)
-		{
-			this.idPlayers.TryGetValue(id, out Player gamer);
-			return gamer;
-		}
-
-		public void Remove(long id)
-		{
-			this.idPlayers.Remove(id);
-		}
-
-		public int Count
-		{
-			get
-			{
-				return this.idPlayers.Count;
-			}
-		}
-
-		public Player[] GetAll()
-		{
-			return this.idPlayers.Values.ToArray();
-		}
+		public readonly Dictionary<long, Player> idPlayers = new Dictionary<long, Player>();
 	}
 	}
 }
 }

+ 1 - 1
Apps/Model/Server/Scene/GateMapComponent.cs

@@ -2,6 +2,6 @@
 {
 {
     public class GateMapComponent: Entity, IAwake
     public class GateMapComponent: Entity, IAwake
     {
     {
-        public Scene Scene;
+        public Scene Scene { get; set; }
     }
     }
 }
 }

+ 1 - 1
Apps/Model/Server/SessionPlayerComponent.cs

@@ -2,6 +2,6 @@
 {
 {
 	public class SessionPlayerComponent : Entity, IAwake, IDestroy
 	public class SessionPlayerComponent : Entity, IAwake, IDestroy
 	{
 	{
-		public long PlayerId;
+		public long PlayerId { get; set; }
 	}
 	}
 }
 }

+ 1 - 1
Apps/Model/Server/Unit/UnitGateComponent.cs

@@ -10,7 +10,7 @@
 
 
 	public class UnitGateComponent : Entity, IAwake<long>, ITransfer
 	public class UnitGateComponent : Entity, IAwake<long>, ITransfer
 	{
 	{
-		public long GateSessionActorId;
+		public long GateSessionActorId { get; private set; }
 
 
 		public void Awake(long gateSessionId)
 		public void Awake(long gateSessionId)
 		{
 		{

+ 17 - 0
ET.sln

@@ -31,6 +31,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apps.ThirdParty", "Apps\Thi
 EndProject
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apps.Tool", "Apps\Tool\Apps.Tool.csproj", "{21A2F73C-A935-42B7-A487-3962718CE29F}"
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apps.Tool", "Apps\Tool\Apps.Tool.csproj", "{21A2F73C-A935-42B7-A487-3962718CE29F}"
 EndProject
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Share", "Share", "{310F62C7-3732-49D7-ACC1-616703F4FE75}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Share.Analyzer", "Share\Analyzer\Share.Analyzer.csproj", "{B3FA1A14-2C98-4893-974A-766791A1E655}"
+EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Debug|Any CPU = Debug|Any CPU
@@ -185,6 +189,18 @@ Global
 		{21A2F73C-A935-42B7-A487-3962718CE29F}.Release|x64.Build.0 = Release|Any CPU
 		{21A2F73C-A935-42B7-A487-3962718CE29F}.Release|x64.Build.0 = Release|Any CPU
 		{21A2F73C-A935-42B7-A487-3962718CE29F}.Release|x86.ActiveCfg = Release|Any CPU
 		{21A2F73C-A935-42B7-A487-3962718CE29F}.Release|x86.ActiveCfg = Release|Any CPU
 		{21A2F73C-A935-42B7-A487-3962718CE29F}.Release|x86.Build.0 = Release|Any CPU
 		{21A2F73C-A935-42B7-A487-3962718CE29F}.Release|x86.Build.0 = Release|Any CPU
+		{B3FA1A14-2C98-4893-974A-766791A1E655}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B3FA1A14-2C98-4893-974A-766791A1E655}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B3FA1A14-2C98-4893-974A-766791A1E655}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{B3FA1A14-2C98-4893-974A-766791A1E655}.Debug|x64.Build.0 = Debug|Any CPU
+		{B3FA1A14-2C98-4893-974A-766791A1E655}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{B3FA1A14-2C98-4893-974A-766791A1E655}.Debug|x86.Build.0 = Debug|Any CPU
+		{B3FA1A14-2C98-4893-974A-766791A1E655}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B3FA1A14-2C98-4893-974A-766791A1E655}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B3FA1A14-2C98-4893-974A-766791A1E655}.Release|x64.ActiveCfg = Release|Any CPU
+		{B3FA1A14-2C98-4893-974A-766791A1E655}.Release|x64.Build.0 = Release|Any CPU
+		{B3FA1A14-2C98-4893-974A-766791A1E655}.Release|x86.ActiveCfg = Release|Any CPU
+		{B3FA1A14-2C98-4893-974A-766791A1E655}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE
@@ -202,6 +218,7 @@ Global
 		{B7A8A3FD-69EC-4156-8076-F33E98392601} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
 		{B7A8A3FD-69EC-4156-8076-F33E98392601} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
 		{E411076A-B800-457D-A36D-06EC716B2663} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
 		{E411076A-B800-457D-A36D-06EC716B2663} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
 		{21A2F73C-A935-42B7-A487-3962718CE29F} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
 		{21A2F73C-A935-42B7-A487-3962718CE29F} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
+		{B3FA1A14-2C98-4893-974A-766791A1E655} = {310F62C7-3732-49D7-ACC1-616703F4FE75}
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {EABC01E3-3EB5-47EF-B46E-AAD8BB3585F1}
 		SolutionGuid = {EABC01E3-3EB5-47EF-B46E-AAD8BB3585F1}

+ 222 - 0
Share/Analyzer/Analyzer/AddChildTypeAnalyzer.cs

@@ -0,0 +1,222 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.Immutable;
+using System.Linq;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Diagnostics;
+
+namespace ET.Analyzer
+{
+    [DiagnosticAnalyzer(LanguageNames.CSharp)]
+    public class AddChildTypeAnalyzer: DiagnosticAnalyzer
+    {
+        private const string Title = "AddChild方法类型约束错误";
+
+        private const string MessageFormat = "Type: {0} 不允许作为实体: {1} 的AddChild函数参数类型! 若要允许该类型作为参数,请使用ChildTypeAttribute对实体类进行标记";
+
+        private const string Description = "请使用被允许的ChildType 或添加该类型至ChildType.";
+
+        private static readonly string[] AddChildMethods = { "AddChild", "AddChildWithId" };
+
+        private static readonly DiagnosticDescriptor Rule =
+                new DiagnosticDescriptor(DiagnosticIds.AddChildTypeAnalyzerRuleId,
+                    Title,
+                    MessageFormat,
+                    DiagnosticCategories.Hotfix,
+                    DiagnosticSeverity.Error,
+                    true,
+                    Description);
+
+        public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
+
+        public override void Initialize(AnalysisContext context)
+        {
+            if (!AnalyzerGlobalSetting.EnableAnalyzer)
+            {
+                return;
+            }
+
+            context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
+            context.EnableConcurrentExecution();
+            context.RegisterSyntaxNodeAction(this.AnalyzeMemberAccessExpression, SyntaxKind.SimpleMemberAccessExpression);
+        }
+
+        private void AnalyzeMemberAccessExpression(SyntaxNodeAnalysisContext context)
+        {
+            if (!AnalyzerHelper.IsAssemblyNeedAnalyze(context.Compilation.AssemblyName, AnalyzeAssembly.AllHotfix))
+            {
+                return;
+            }
+
+            if (!(context.Node is MemberAccessExpressionSyntax memberAccessExpressionSyntax))
+            {
+                return;
+            }
+
+            // 筛选出 AddChild函数syntax
+            string methodName = memberAccessExpressionSyntax.Name.Identifier.Text;
+            if (!AddChildMethods.Contains(methodName))
+            {
+                return;
+            }
+
+            if (!(memberAccessExpressionSyntax.Parent is InvocationExpressionSyntax invocationExpressionSyntax) ||
+                !(context.SemanticModel.GetSymbolInfo(invocationExpressionSyntax).Symbol is IMethodSymbol addChildMethodSymbol))
+            {
+                return;
+            }
+
+            IdentifierNameSyntax? identifierSyntax = memberAccessExpressionSyntax.GetFirstChild<IdentifierNameSyntax>();
+            if (identifierSyntax == null)
+            {
+                return;
+            }
+
+            ISymbol? identifierSymbol = context.SemanticModel.GetSymbolInfo(identifierSyntax).Symbol;
+            if (identifierSymbol == null)
+            {
+                Diagnostic diagnostic = Diagnostic.Create(Rule, memberAccessExpressionSyntax?.Name.Identifier.GetLocation());
+                context.ReportDiagnostic(diagnostic);
+                throw new Exception("identifierSymbol == null");
+            }
+
+            // 获取父级实体类型
+            ITypeSymbol? parentTypeSymbol = null;
+
+            if (identifierSymbol is ILocalSymbol localSymbol)
+            {
+                parentTypeSymbol = localSymbol.Type;
+            }
+            else if (identifierSymbol is IParameterSymbol parameterSymbol)
+            {
+                parentTypeSymbol = parameterSymbol.Type;
+            }
+            else
+            {
+                Diagnostic diagnostic = Diagnostic.Create(Rule, memberAccessExpressionSyntax?.Name.Identifier.GetLocation());
+                context.ReportDiagnostic(diagnostic);
+                throw new Exception("componentTypeSymbol==null");
+            }
+
+            // 获取实体类 ChildType标签的约束类型
+            List<INamedTypeSymbol>? availableChildTypeSymbols = null;
+            foreach (AttributeData? attributeData in parentTypeSymbol.GetAttributes())
+            {
+                if (attributeData.AttributeClass?.Name == "ChildTypeAttribute")
+                {
+                    if (!(attributeData.ConstructorArguments[0].Value is INamedTypeSymbol availableChildTypeSymbol))
+                    {
+                        continue;
+                    }
+
+                    if (availableChildTypeSymbols == null)
+                    {
+                        availableChildTypeSymbols = new List<INamedTypeSymbol>();
+                    }
+
+                    availableChildTypeSymbols.Add(availableChildTypeSymbol);
+                }
+            }
+
+            // 没有ChildType标签的不做约束
+            if (availableChildTypeSymbols == null)
+            {
+                return;
+            }
+
+            // 获取 child实体类型
+            ISymbol? childTypeSymbol = null;
+            // addChild为泛型调用
+            if (addChildMethodSymbol.IsGenericMethod)
+            {
+                GenericNameSyntax? genericNameSyntax = memberAccessExpressionSyntax?.GetFirstChild<GenericNameSyntax>();
+
+                TypeArgumentListSyntax? typeArgumentList = genericNameSyntax?.GetFirstChild<TypeArgumentListSyntax>();
+
+                IdentifierNameSyntax? childTypeSyntax = typeArgumentList?.GetFirstChild<IdentifierNameSyntax>();
+
+                if (childTypeSyntax == null)
+                {
+                    Diagnostic diagnostic = Diagnostic.Create(Rule, memberAccessExpressionSyntax?.Name.Identifier.GetLocation());
+                    context.ReportDiagnostic(diagnostic);
+                    throw new Exception("childTypeSyntax==null");
+                }
+
+                childTypeSymbol = context.SemanticModel.GetSymbolInfo(childTypeSyntax).Symbol;
+            }
+            // addChild为非泛型调用
+            else
+            {
+                SyntaxNode? firstArgumentSyntax = invocationExpressionSyntax.GetFirstChild<ArgumentListSyntax>()?.GetFirstChild<ArgumentSyntax>()
+                        ?.ChildNodes().First();
+                if (firstArgumentSyntax == null)
+                {
+                    Diagnostic diagnostic = Diagnostic.Create(Rule, memberAccessExpressionSyntax?.Name.Identifier.GetLocation());
+                    context.ReportDiagnostic(diagnostic);
+                    throw new Exception("firstArgumentSyntax==null");
+                }
+
+                ISymbol? firstArgumentSymbol = context.SemanticModel.GetSymbolInfo(firstArgumentSyntax).Symbol;
+
+                if (firstArgumentSymbol is ILocalSymbol childLocalSymbol)
+                {
+                    childTypeSymbol = childLocalSymbol.Type;
+                }
+                else if (firstArgumentSymbol is IParameterSymbol childParamaterSymbol)
+                {
+                    childTypeSymbol = childParamaterSymbol.Type;
+                }
+                else if (firstArgumentSymbol is IMethodSymbol methodSymbol)
+                {
+                    childTypeSymbol = methodSymbol.ReturnType;
+                }
+                else if (firstArgumentSymbol is IFieldSymbol fieldSymbol)
+                {
+                    childTypeSymbol = fieldSymbol.Type;
+                }
+                else if (firstArgumentSymbol is IPropertySymbol propertySymbol)
+                {
+                    childTypeSymbol = propertySymbol.Type;
+                }
+                else if (firstArgumentSymbol != null)
+                {
+                    Diagnostic diagnostic = Diagnostic.Create(Rule, memberAccessExpressionSyntax?.Name.Identifier.GetLocation(),
+                        firstArgumentSymbol.Name, parentTypeSymbol.Name);
+                    context.ReportDiagnostic(diagnostic);
+                    return;
+                }
+                else
+                {
+                    Diagnostic diagnostic = Diagnostic.Create(Rule, memberAccessExpressionSyntax?.Name.Identifier.GetLocation(),
+                        firstArgumentSyntax.GetText(), parentTypeSymbol.Name);
+                    context.ReportDiagnostic(diagnostic);
+                    return;
+                }
+            }
+
+            if (childTypeSymbol == null)
+            {
+                Diagnostic diagnostic = Diagnostic.Create(Rule, memberAccessExpressionSyntax?.Name?.Identifier.GetLocation());
+                context.ReportDiagnostic(diagnostic);
+                throw new Exception("childTypeSymbol==null");
+            }
+
+            // 判断child类型是否属于约束类型
+            foreach (INamedTypeSymbol? availableChildTypeSymbol in availableChildTypeSymbols)
+            {
+                if (availableChildTypeSymbol?.ToString() == childTypeSymbol.ToString())
+                {
+                    return;
+                }
+            }
+
+            {
+                Diagnostic diagnostic = Diagnostic.Create(Rule, memberAccessExpressionSyntax?.Name.Identifier.GetLocation(), childTypeSymbol?.Name,
+                    parentTypeSymbol?.Name);
+                context.ReportDiagnostic(diagnostic);
+            }
+        }
+    }
+}

+ 84 - 0
Share/Analyzer/Analyzer/ClassDeclarationInHotfixAnalyzer.cs

@@ -0,0 +1,84 @@
+using System.Collections.Immutable;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.Diagnostics;
+
+namespace ET.Analyzer
+{
+    [DiagnosticAnalyzer(LanguageNames.CSharp)]
+    public class ClassDeclarationInHotfixAnalyzer: DiagnosticAnalyzer
+    {
+        private const string Title = "Hotfix程序集中 只能声明含有BaseAttribute子类特性的类或静态类";
+
+        private const string MessageFormat = "Hotfix程序集中 只能声明含有BaseAttribute子类特性的类或静态类 类: {0}";
+
+        private const string Description = "Hotfix程序集中 只能声明含有BaseAttribute子类特性的类或静态类.";
+
+        private const string BaseAttribute = "ET.BaseAttribute";
+
+        private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticIds.ClassDeclarationInHotfixAnalyzerRuleId,
+            Title,
+            MessageFormat,
+            DiagnosticCategories.Hotfix,
+            DiagnosticSeverity.Error, true, Description);
+
+        public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
+
+        public override void Initialize(AnalysisContext context)
+        {
+            if (!AnalyzerGlobalSetting.EnableAnalyzer)
+            {
+                return;
+            }
+
+            context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
+            context.EnableConcurrentExecution();
+            context.RegisterSymbolAction(this.Analyzer, SymbolKind.NamedType);
+        }
+
+        private void Analyzer(SymbolAnalysisContext context)
+        {
+            if (!AnalyzerHelper.IsAssemblyNeedAnalyze(context.Compilation.AssemblyName, AnalyzeAssembly.AllHotfix))
+            {
+                return;
+            }
+
+            if (!(context.Symbol is INamedTypeSymbol namedTypeSymbol))
+            {
+                return;
+            }
+
+            if (namedTypeSymbol.IsStatic)
+            {
+                return;
+            }
+
+            if (!this.CheckIsTypeOrBaseTypeHasBaseAttributeInherit(namedTypeSymbol))
+            {
+                foreach (SyntaxReference? declaringSyntaxReference in namedTypeSymbol.DeclaringSyntaxReferences)
+                {
+                    Diagnostic diagnostic = Diagnostic.Create(Rule, declaringSyntaxReference.GetSyntax()?.GetLocation(), namedTypeSymbol.Name);
+                    context.ReportDiagnostic(diagnostic);
+                }
+            }
+        }
+
+        /// <summary>
+        ///     检查该类或其基类是否有BaseAttribute的子类特性标记
+        /// </summary>
+        private bool CheckIsTypeOrBaseTypeHasBaseAttributeInherit(INamedTypeSymbol namedTypeSymbol)
+        {
+            INamedTypeSymbol? typeSymbol = namedTypeSymbol;
+            while (typeSymbol != null)
+            {
+                if (typeSymbol.HasBaseAttribute(BaseAttribute))
+                {
+                    return true;
+                }
+
+                typeSymbol = typeSymbol.BaseType;
+            }
+
+            return false;
+        }
+    }
+}

+ 58 - 0
Share/Analyzer/Analyzer/EntityClassDeclarationAnalyzer.cs

@@ -0,0 +1,58 @@
+using System.Collections.Immutable;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.Diagnostics;
+
+namespace ET.Analyzer
+{
+    [DiagnosticAnalyzer(LanguageNames.CSharp)]
+    public class EntityClassDeclarationAnalyzer: DiagnosticAnalyzer
+    {
+        private const string Title = "实体类限制多层继承";
+
+        private const string MessageFormat = "类: {0} 不能继承Entiy的子类 请直接继承Entity";
+
+        private const string Description = "实体类限制多层继承.";
+
+        private const string EntityType = "ET.Entity";
+
+        private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticIds.EntityClassDeclarationAnalyzerRuleId,
+            Title,
+            MessageFormat,
+            DiagnosticCategories.All,
+            DiagnosticSeverity.Error, true, Description);
+
+        public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
+
+        public override void Initialize(AnalysisContext context)
+        {
+            if (!AnalyzerGlobalSetting.EnableAnalyzer)
+            {
+                return;
+            }
+
+            context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
+            context.EnableConcurrentExecution();
+            context.RegisterSymbolAction(this.Analyzer, SymbolKind.NamedType);
+        }
+
+        private void Analyzer(SymbolAnalysisContext context)
+        {
+            if (!(context.Symbol is INamedTypeSymbol namedTypeSymbol))
+            {
+                return;
+            }
+
+            if (namedTypeSymbol.BaseType?.BaseType?.ToString() != EntityType)
+            {
+                return;
+            }
+
+            foreach (SyntaxReference? declaringSyntaxReference in namedTypeSymbol.DeclaringSyntaxReferences)
+            {
+                SyntaxNode classSyntax = declaringSyntaxReference.GetSyntax();
+                Diagnostic diagnostic = Diagnostic.Create(Rule, classSyntax.GetLocation(), namedTypeSymbol.Name, context.Compilation.AssemblyName);
+                context.ReportDiagnostic(diagnostic);
+            }
+        }
+    }
+}

+ 167 - 0
Share/Analyzer/Analyzer/EntityFiledAccessAnalyzer.cs

@@ -0,0 +1,167 @@
+using System.Collections.Immutable;
+using System.Linq;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Diagnostics;
+
+namespace ET.Analyzer
+{
+    [DiagnosticAnalyzer(LanguageNames.CSharp)]
+    public class EntityFiledAccessAnalyzer: DiagnosticAnalyzer
+    {
+        private const string Title = "实体字段访问错误";
+
+        private const string MessageFormat = "实体: {0} 字段: {1} 只能在实体类生命周期组件或友元类(含有FriendClassAttribute)中访问";
+
+        private const string Description = "请使用实体类属性或方法访问其他实体字段.";
+
+        private const string EntityType = "ET.Entity";
+
+        private const string ObjectSystemAttribute = "ET.ObjectSystemAttribute";
+
+        private const string ISystemType = "ET.ISystemType";
+
+        private const string FriendClassAttribute = "ET.FriendClassAttribute";
+
+        private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticIds.EntityFiledAccessAnalyzerRuleId,
+            Title,
+            MessageFormat,
+            DiagnosticCategories.Hotfix,
+            DiagnosticSeverity.Error, true, Description);
+
+        public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
+
+        public override void Initialize(AnalysisContext context)
+        {
+            if (!AnalyzerGlobalSetting.EnableAnalyzer)
+            {
+                return;
+            }
+
+            context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
+            context.EnableConcurrentExecution();
+            context.RegisterSyntaxNodeAction(this.AnalyzeMemberAccessExpression, SyntaxKind.SimpleMemberAccessExpression);
+        }
+
+        private void AnalyzeMemberAccessExpression(SyntaxNodeAnalysisContext context)
+        {
+            if (!AnalyzerHelper.IsAssemblyNeedAnalyze(context.Compilation.AssemblyName, AnalyzeAssembly.AllHotfix))
+            {
+                return;
+            }
+
+            if (!(context.Node is MemberAccessExpressionSyntax memberAccessExpressionSyntax))
+            {
+                return;
+            }
+
+            // -----筛选出实体类的字段symbol-----
+
+            ISymbol? filedSymbol = context.SemanticModel.GetSymbolInfo(memberAccessExpressionSyntax).Symbol;
+            if (filedSymbol == null || !(filedSymbol is IFieldSymbol))
+            {
+                return;
+            }
+
+            if (filedSymbol.IsStatic)
+            {
+                return;
+            }
+
+            if (filedSymbol.ContainingType.BaseType?.ToString() != EntityType)
+            {
+                return;
+            }
+
+            // -----筛选出在实体类和实体System外部字段访问-----
+            // 实体System包括awakeSystem updateSystem等生命周期类和 componentSystem静态方法类
+
+            ClassDeclarationSyntax? accessFieldClassDeclaretion = memberAccessExpressionSyntax.GetParentClassDeclaration();
+            if (accessFieldClassDeclaretion == null)
+            {
+                return;
+            }
+
+            INamedTypeSymbol? accessFieldClassSymbol = context.SemanticModel.GetDeclaredSymbol(accessFieldClassDeclaretion);
+
+            if (accessFieldClassSymbol == null)
+            {
+                return;
+            }
+
+            // 实体基类忽略处理
+            if (accessFieldClassSymbol.ToString() == EntityType)
+            {
+                return;
+            }
+
+            //判断是否在实体类生命周期System中
+            if (this.CheckIsEntityLifecycleSystem(accessFieldClassSymbol, filedSymbol.ContainingType))
+            {
+                return;
+            }
+
+            //判断是否在实体类的友元类中
+            if (this.CheckIsEntityFriendClass(accessFieldClassSymbol, filedSymbol.ContainingType))
+            {
+                return;
+            }
+
+            Diagnostic diagnostic = Diagnostic.Create(Rule, memberAccessExpressionSyntax.GetLocation(), filedSymbol.ContainingType.Name,
+                filedSymbol.Name);
+            context.ReportDiagnostic(diagnostic);
+        }
+
+        private bool CheckIsEntityLifecycleSystem(INamedTypeSymbol accessFieldClassSymbol, INamedTypeSymbol entityTypeSymbol)
+        {
+            if (accessFieldClassSymbol.BaseType == null || !accessFieldClassSymbol.BaseType.IsGenericType)
+            {
+                return false;
+            }
+
+            // 判断是否含有 ObjectSystem Attribute 且继承了接口 ISystemType
+            if (accessFieldClassSymbol.BaseType.HasAttribute(ObjectSystemAttribute) && accessFieldClassSymbol.HasInterface(ISystemType))
+            {
+                // 获取 accessFieldClassSymbol 父类的实体类型参数
+                ITypeSymbol? entityTypeArgumentSymbol = accessFieldClassSymbol.BaseType.TypeArguments.FirstOrDefault();
+                if (entityTypeArgumentSymbol == null)
+                {
+                    return false;
+                }
+
+                // 判断 accessFieldClassSymbol 父类的实体类型参数是否为 entityTypeSymbol
+                if (entityTypeArgumentSymbol.ToString() == entityTypeSymbol.ToString())
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+
+        private bool CheckIsEntityFriendClass(INamedTypeSymbol accessFieldTypeSymbol, INamedTypeSymbol entityTypeSymbol)
+        {
+            var attributes = accessFieldTypeSymbol.GetAttributes();
+            foreach (AttributeData? attributeData in attributes)
+            {
+                if (attributeData.AttributeClass?.ToString() != FriendClassAttribute)
+                {
+                    continue;
+                }
+
+                if (!(attributeData.ConstructorArguments[0].Value is INamedTypeSymbol namedTypeSymbol))
+                {
+                    continue;
+                }
+
+                if (namedTypeSymbol.ToString() == entityTypeSymbol.ToString())
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+    }
+}

+ 70 - 0
Share/Analyzer/Analyzer/HotfixProjectFieldDeclarationAnalyzer.cs

@@ -0,0 +1,70 @@
+using System.Collections.Immutable;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.Diagnostics;
+
+namespace ET.Analyzer
+{
+    [DiagnosticAnalyzer(LanguageNames.CSharp)]
+    public class HotfixProjectFieldDeclarationAnalyzer: DiagnosticAnalyzer
+    {
+        private const string Title = "实体字段访问错误";
+
+        private const string MessageFormat = "Hotfix程序集中 不允许声明非Const字段  字段: {0}";
+
+        private const string Description = "请使用实体类属性或方法访问其他实体字段.";
+
+        private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticIds.HotfixProjectFieldDeclarationAnalyzerRuleId,
+            Title,
+            MessageFormat,
+            DiagnosticCategories.Hotfix,
+            DiagnosticSeverity.Error, true, Description);
+
+        public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
+
+        public override void Initialize(AnalysisContext context)
+        {
+            if (!AnalyzerGlobalSetting.EnableAnalyzer)
+            {
+                return;
+            }
+
+            context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
+            context.EnableConcurrentExecution();
+            context.RegisterSymbolAction(this.Analyzer, SymbolKind.NamedType);
+        }
+
+        private void Analyzer(SymbolAnalysisContext context)
+        {
+            if (!AnalyzerHelper.IsAssemblyNeedAnalyze(context.Compilation.AssemblyName, AnalyzeAssembly.AllHotfix))
+            {
+                return;
+            }
+
+            if (!(context.Symbol is INamedTypeSymbol namedTypeSymbol))
+            {
+                return;
+            }
+
+            foreach (ISymbol? memberSymbol in namedTypeSymbol.GetMembers())
+            {
+                // 筛选出字段成员
+                if (!(memberSymbol is IFieldSymbol fieldSymbol))
+                {
+                    return;
+                }
+
+                // 允许声明Const字段
+                if (fieldSymbol.IsConst)
+                {
+                    return;
+                }
+
+                foreach (SyntaxReference? declaringSyntaxReference in fieldSymbol.DeclaringSyntaxReferences)
+                {
+                    Diagnostic diagnostic = Diagnostic.Create(Rule, declaringSyntaxReference.GetSyntax()?.GetLocation(), fieldSymbol.Name);
+                    context.ReportDiagnostic(diagnostic);
+                }
+            }
+        }
+    }
+}

+ 10 - 0
Share/Analyzer/AnalyzerGlobalSetting.cs

@@ -0,0 +1,10 @@
+namespace ET.Analyzer
+{
+    public static class AnalyzerGlobalSetting
+    {
+        /// <summary>
+        /// 是否开启项目的所有分析器
+        /// </summary>
+        public static bool EnableAnalyzer = true;
+    }
+}

+ 23 - 0
Share/Analyzer/Config/AnalyzeAssembly.cs

@@ -0,0 +1,23 @@
+namespace ET.Analyzer
+{
+    public static class AnalyzeAssembly
+    {
+        public const string ServerModel = "Model";
+
+        public const string SerVerHotfix = "Hotfix";
+
+        public const string UnityModel = "Unity.Model";
+
+        public const string UnityHotfix = "Unity.Hotfix";
+
+        public const string UnityModelView = "Unity.ModelView";
+
+        public const string UnityHotfixView = "Unity.HotfixView";
+
+        public static readonly string[] AllHotfix = new string[] { SerVerHotfix, UnityHotfix, UnityHotfixView };
+
+        public static readonly string[] AllModel = new string[] { ServerModel, UnityModel, UnityModelView };
+
+        public static readonly string[] All = new string[] { ServerModel, SerVerHotfix, UnityModel, UnityHotfix, UnityModelView, UnityHotfixView };
+    }
+}

+ 10 - 0
Share/Analyzer/Config/DiagnosticCategories.cs

@@ -0,0 +1,10 @@
+namespace ET.Analyzer
+{
+    public static class DiagnosticCategories
+    {
+        public const string Hotfix = "ETHotfixProjectAnalyzers";
+        public const string Model = "ETModelProjectAnalyzers";
+        public const string All = "ETAllProjectAnalyzers";
+    }
+}
+

+ 17 - 0
Share/Analyzer/Config/DiagnosticIds.cs

@@ -0,0 +1,17 @@
+namespace ET.Analyzer
+{
+    public static class DiagnosticIds
+    {
+        public const string AddChildTypeAnalyzerRuleId = "ET00001";
+        
+        public const string EntityFiledAccessAnalyzerRuleId = "ET00002";
+
+        public const string EntityClassDeclarationAnalyzerRuleId = "ET00003";
+
+        public const string HotfixProjectFieldDeclarationAnalyzerRuleId = "ET00004";
+
+        public const string ClassDeclarationInHotfixAnalyzerRuleId = "ET00005";
+
+    }
+}
+

+ 157 - 0
Share/Analyzer/Extension/AnalyzerHelper.cs

@@ -0,0 +1,157 @@
+using System.Linq;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+
+namespace ET.Analyzer
+{
+    public static class AnalyzerHelper
+    {
+        /// <summary>
+        ///     获取语法树节点的子节点中第一个指定类型节点
+        /// </summary>
+        /// <param name="syntaxNode">语法树节点</param>
+        /// <typeparam name="T">指定语法节点类型</typeparam>
+        /// <returns>第一个指定类型节点</returns>
+        public static T? GetFirstChild<T>(this SyntaxNode syntaxNode) where T : SyntaxNode
+        {
+            foreach (SyntaxNode? childNode in syntaxNode.ChildNodes())
+            {
+                if (childNode.GetType() == typeof (T))
+                {
+                    return childNode as T;
+                }
+            }
+
+            return null;
+        }
+
+        /// <summary>
+        ///     获取语法树节点的子节点中最后一个指定类型节点
+        /// </summary>
+        /// <param name="syntaxNode">语法树节点</param>
+        /// <typeparam name="T">指定语法节点类型</typeparam>
+        /// <returns>最后一个指定类型节点</returns>
+        public static T? GetLastChild<T>(this SyntaxNode syntaxNode) where T : SyntaxNode
+        {
+            foreach (SyntaxNode? childNode in syntaxNode.ChildNodes().Reverse())
+            {
+                if (childNode.GetType() == typeof (T))
+                {
+                    return childNode as T;
+                }
+            }
+
+            return null;
+        }
+
+        /// <summary>
+        ///     获取语法节点所属的ClassDeclarationSyntax
+        /// </summary>
+        public static ClassDeclarationSyntax? GetParentClassDeclaration(this SyntaxNode syntaxNode)
+        {
+            SyntaxNode? parentNode = syntaxNode.Parent;
+            while (parentNode != null)
+            {
+                if (parentNode is ClassDeclarationSyntax classDeclarationSyntax)
+                {
+                    return classDeclarationSyntax;
+                }
+
+                parentNode = parentNode.Parent;
+            }
+
+            return null;
+        }
+
+        /// <summary>
+        ///     INamedTypeSymbol 是否有指定的Attribute
+        /// </summary>
+        public static bool HasAttribute(this INamedTypeSymbol namedTypeSymbol, string AttributeName)
+        {
+            foreach (AttributeData? attributeData in namedTypeSymbol.GetAttributes())
+            {
+                if (attributeData.AttributeClass?.ToString() == AttributeName)
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+
+        /// <summary>
+        ///     INamedTypeSymbol 是否有指定的基类Attribute
+        /// </summary>
+        public static bool HasBaseAttribute(this INamedTypeSymbol namedTypeSymbol, string AttributeName)
+        {
+            foreach (AttributeData? attributeData in namedTypeSymbol.GetAttributes())
+            {
+                INamedTypeSymbol? attributeType = attributeData.AttributeClass?.BaseType;
+                while (attributeType != null)
+                {
+                    if (attributeType.ToString() == AttributeName)
+                    {
+                        return true;
+                    }
+
+                    attributeType = attributeType.BaseType;
+                }
+            }
+
+            return false;
+        }
+
+        /// <summary>
+        ///     INamedTypeSymbol 获取指定类型的第一个Attribute
+        /// </summary>
+        public static AttributeData? GetFirstAttribute(this INamedTypeSymbol namedTypeSymbol, string AttributeName)
+        {
+            foreach (AttributeData? attributeData in namedTypeSymbol.GetAttributes())
+            {
+                if (attributeData.AttributeClass?.ToString() == AttributeName)
+                {
+                    return attributeData;
+                }
+            }
+
+            return null;
+        }
+
+        /// <summary>
+        ///     INamedTypeSymbol 是否含有指定接口
+        /// </summary>
+        public static bool HasInterface(this INamedTypeSymbol namedTypeSymbol, string InterfaceName)
+        {
+            foreach (INamedTypeSymbol? iInterface in namedTypeSymbol.AllInterfaces)
+            {
+                if (iInterface.ToString() == InterfaceName)
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+
+        /// <summary>
+        ///     判断指定的程序集是否需要分析
+        /// </summary>
+        public static bool IsAssemblyNeedAnalyze(string? assemblyName, params string[] analyzeAssemblyNames)
+        {
+            if (assemblyName == null)
+            {
+                return false;
+            }
+
+            foreach (string analyzeAssemblyName in analyzeAssemblyNames)
+            {
+                if (assemblyName == analyzeAssemblyName)
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+    }
+}

+ 24 - 0
Share/Analyzer/Share.Analyzer.csproj

@@ -0,0 +1,24 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+    <PropertyGroup>
+        <TargetFramework>netstandard2.0</TargetFramework>
+        <IncludeBuildOutput>false</IncludeBuildOutput>
+        <Nullable>enable</Nullable>
+        <LangVersion>8</LangVersion>
+    </PropertyGroup>
+
+    <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+      <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+      <NoWarn>1701;1702;RS2008</NoWarn>
+    </PropertyGroup>
+
+    <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
+      <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+      <NoWarn>1701;1702;RS2008</NoWarn>
+    </PropertyGroup>
+    <ItemGroup>
+        <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.1" PrivateAssets="all" />
+        <PackageReference Update="NETStandard.Library" PrivateAssets="all" />
+    </ItemGroup>
+
+</Project>

+ 8 - 0
Unity/Assets/Editor/AssetPostProcessor.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 52a0058e2cd667648a8ba92689e0263c
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 17 - 0
Unity/Assets/Editor/AssetPostProcessor/OnGenerateCSProjectProcessor.cs

@@ -0,0 +1,17 @@
+using UnityEditor;
+using UnityEngine;
+
+namespace ET
+{
+    public class OnGenerateCSProjectProcessor : AssetPostprocessor
+    {
+        public static string OnGeneratedCSProject(string path, string content)
+        {
+            if (path.EndsWith("Unity.Mono.csproj"))
+            {
+                return content.Replace("<OutputPath>Temp\\Bin\\Debug\\Unity.Mono\\</OutputPath>", "<OutputPath>Temp\\Bin\\Debug\\</OutputPath>");
+            }
+            return content;
+        }
+    }
+}

+ 1 - 1
Unity/Assets/Mono/ILRuntime/Generate/ET_ComponentView_Binding.cs.meta → Unity/Assets/Editor/AssetPostProcessor/OnGenerateCSProjectProcessor.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
 fileFormatVersion: 2
-guid: eb7a319e2f4d6924dad0462fdc01e69b
+guid: 9ffc58538c5a27044afacc18aa82e5b4
 MonoImporter:
 MonoImporter:
   externalObjects: {}
   externalObjects: {}
   serializedVersion: 2
   serializedVersion: 2

+ 57 - 53
Unity/Assets/Mono/ILRuntime/Generate/CLRBindings.cs

@@ -22,45 +22,26 @@ namespace ILRuntime.Runtime.Generated
         /// </summary>
         /// </summary>
         public static void Initialize(ILRuntime.Runtime.Enviorment.AppDomain app)
         public static void Initialize(ILRuntime.Runtime.Enviorment.AppDomain app)
         {
         {
-            System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_Binding.Register(app);
-            ET_TimeHelper_Binding.Register(app);
-            ET_ETAsyncTaskMethodBuilder_Binding.Register(app);
-            ET_Log_Binding.Register(app);
-            System_String_Binding.Register(app);
-            ET_ETTask_1_Boolean_Binding.Register(app);
-            ET_ETTask_1_Int32_Binding.Register(app);
-            ET_ETTask_1_ILTypeInstance_Binding.Register(app);
-            ET_ETTask_Binding.Register(app);
-            ET_NetworkHelper_Binding.Register(app);
-            ET_ListComponent_1_Vector3_Binding.Register(app);
-            System_Collections_Generic_List_1_Single_Binding.Register(app);
-            UnityEngine_Vector3_Binding.Register(app);
             System_Collections_Generic_List_1_Vector3_Binding.Register(app);
             System_Collections_Generic_List_1_Vector3_Binding.Register(app);
+            ET_ListComponent_1_Vector3_Binding.Register(app);
+            ET_ETTask_1_Boolean_Binding.Register(app);
             System_IDisposable_Binding.Register(app);
             System_IDisposable_Binding.Register(app);
-            UnityEngine_Quaternion_Binding.Register(app);
-            ET_ETTaskCompleted_Binding.Register(app);
             ET_ETAsyncTaskMethodBuilder_1_Boolean_Binding.Register(app);
             ET_ETAsyncTaskMethodBuilder_1_Boolean_Binding.Register(app);
+            ET_TimeHelper_Binding.Register(app);
+            UnityEngine_Vector3_Binding.Register(app);
+            UnityEngine_Quaternion_Binding.Register(app);
             System_Action_1_Boolean_Binding.Register(app);
             System_Action_1_Boolean_Binding.Register(app);
             System_Math_Binding.Register(app);
             System_Math_Binding.Register(app);
+            System_String_Binding.Register(app);
+            ET_Log_Binding.Register(app);
             System_Collections_Generic_List_1_Vector3_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_List_1_Vector3_Binding_Enumerator_Binding.Register(app);
             ET_ETCancellationToken_Binding.Register(app);
             ET_ETCancellationToken_Binding.Register(app);
-            ET_ETAsyncTaskMethodBuilder_1_Int32_Binding.Register(app);
-            ET_ETAsyncTaskMethodBuilder_1_ILTypeInstance_Binding.Register(app);
-            System_IO_MemoryStream_Binding.Register(app);
-            System_BitConverter_Binding.Register(app);
-            System_Collections_Generic_List_1_ILTypeInstance_Binding.Register(app);
-            System_Collections_Generic_List_1_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
-            System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_Binding.Register(app);
-            System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_Binding_ValueCollection_Binding.Register(app);
-            System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_Binding_ValueCollection_Binding_Enumerator_Binding.Register(app);
-            System_Linq_Enumerable_Binding.Register(app);
-            System_Collections_Generic_List_1_Int32_Binding.Register(app);
-            System_Collections_Generic_List_1_Int64_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_SortedDictionary_2_Int32_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_SortedDictionary_2_Int32_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_SortedDictionary_2_Int32_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_SortedDictionary_2_Int32_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_SortedDictionary_2_Int32_ILTypeInstance_Binding_ValueCollection_Binding.Register(app);
             System_Collections_Generic_SortedDictionary_2_Int32_ILTypeInstance_Binding_ValueCollection_Binding.Register(app);
             System_Collections_Generic_SortedDictionary_2_Int32_ILTypeInstance_Binding_ValueCollection_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_SortedDictionary_2_Int32_ILTypeInstance_Binding_ValueCollection_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding.Register(app);
+            ET_ETTask_Binding.Register(app);
             System_Type_Binding.Register(app);
             System_Type_Binding.Register(app);
             System_Collections_Generic_HashSet_1_Type_Binding.Register(app);
             System_Collections_Generic_HashSet_1_Type_Binding.Register(app);
             System_Collections_Generic_HashSet_1_Type_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_HashSet_1_Type_Binding_Enumerator_Binding.Register(app);
@@ -68,58 +49,63 @@ namespace ILRuntime.Runtime.Generated
             System_Reflection_MemberInfo_Binding.Register(app);
             System_Reflection_MemberInfo_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_Object_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_Object_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_String_Byte_Array_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_String_Byte_Array_Binding.Register(app);
+            ET_ETAsyncTaskMethodBuilder_Binding.Register(app);
             System_Threading_Monitor_Binding.Register(app);
             System_Threading_Monitor_Binding.Register(app);
             ET_ListComponent_1_Task_Binding.Register(app);
             ET_ListComponent_1_Task_Binding.Register(app);
             System_Threading_Tasks_Task_Binding.Register(app);
             System_Threading_Tasks_Task_Binding.Register(app);
             System_Collections_Generic_List_1_Task_Binding.Register(app);
             System_Collections_Generic_List_1_Task_Binding.Register(app);
             System_Runtime_CompilerServices_TaskAwaiter_Binding.Register(app);
             System_Runtime_CompilerServices_TaskAwaiter_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_UInt16_List_1_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_UInt16_List_1_ILTypeInstance_Binding.Register(app);
-            ET_TService_Binding.Register(app);
-            ET_AService_Binding.Register(app);
+            System_Collections_Generic_List_1_ILTypeInstance_Binding.Register(app);
+            System_Collections_Generic_List_1_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
             ET_RandomHelper_Binding.Register(app);
             ET_RandomHelper_Binding.Register(app);
+            ET_AService_Binding.Register(app);
+            ET_TService_Binding.Register(app);
             ET_ThreadSynchronizationContext_Binding.Register(app);
             ET_ThreadSynchronizationContext_Binding.Register(app);
             System_Collections_Generic_HashSet_1_AService_Binding.Register(app);
             System_Collections_Generic_HashSet_1_AService_Binding.Register(app);
             System_Collections_Generic_HashSet_1_AService_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_HashSet_1_AService_Binding_Enumerator_Binding.Register(app);
             System_Object_Binding.Register(app);
             System_Object_Binding.Register(app);
             System_Exception_Binding.Register(app);
             System_Exception_Binding.Register(app);
-            ET_TimeInfo_Binding.Register(app);
-            ET_RpcException_Binding.Register(app);
-            System_Collections_Generic_Dictionary_2_String_Object_Binding.Register(app);
-            System_Collections_Generic_Dictionary_2_String_Object_Binding_Enumerator_Binding.Register(app);
-            System_Collections_Generic_KeyValuePair_2_String_Object_Binding.Register(app);
-            UnityEngine_TextAsset_Binding.Register(app);
-            UnityEngine_GameObject_Binding.Register(app);
-            UnityEngine_LayerMask_Binding.Register(app);
-            UnityEngine_Input_Binding.Register(app);
+            ET_ETTaskCompleted_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_String_Int64_Binding.Register(app);
+            System_Func_2_String_Byte_Array_Binding.Register(app);
+            ET_Recast_Binding.Register(app);
+            ET_MathHelper_Binding.Register(app);
+            UnityEngine_Mathf_Binding.Register(app);
+            ET_StringHelper_Binding.Register(app);
             UnityEngine_Camera_Binding.Register(app);
             UnityEngine_Camera_Binding.Register(app);
-            UnityEngine_Physics_Binding.Register(app);
-            UnityEngine_RaycastHit_Binding.Register(app);
-            ET_CodeLoader_Binding.Register(app);
+            UnityEngine_Component_Binding.Register(app);
+            UnityEngine_Transform_Binding.Register(app);
+            UnityEngine_GameObject_Binding.Register(app);
             UnityEngine_AsyncOperation_Binding.Register(app);
             UnityEngine_AsyncOperation_Binding.Register(app);
             UnityEngine_SceneManagement_SceneManager_Binding.Register(app);
             UnityEngine_SceneManagement_SceneManager_Binding.Register(app);
-            UnityEngine_Resources_Binding.Register(app);
+            ET_ETTask_1_ILTypeInstance_Binding.Register(app);
+            ET_ETAsyncTaskMethodBuilder_1_ILTypeInstance_Binding.Register(app);
             UnityEngine_Object_Binding.Register(app);
             UnityEngine_Object_Binding.Register(app);
-            ReferenceCollector_Binding.Register(app);
-            UnityEngine_UI_Button_Binding.Register(app);
-            UnityEngine_Events_UnityEvent_Binding.Register(app);
-            UnityEngine_UI_InputField_Binding.Register(app);
-            UnityEngine_Transform_Binding.Register(app);
+            UnityEngine_Resources_Binding.Register(app);
+            UnityEngine_LayerMask_Binding.Register(app);
             UnityEngine_Animator_Binding.Register(app);
             UnityEngine_Animator_Binding.Register(app);
             UnityEngine_RuntimeAnimatorController_Binding.Register(app);
             UnityEngine_RuntimeAnimatorController_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_String_AnimationClip_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_String_AnimationClip_Binding.Register(app);
             UnityEngine_AnimatorControllerParameter_Binding.Register(app);
             UnityEngine_AnimatorControllerParameter_Binding.Register(app);
             System_Collections_Generic_HashSet_1_String_Binding.Register(app);
             System_Collections_Generic_HashSet_1_String_Binding.Register(app);
             UnityEngine_AnimationClip_Binding.Register(app);
             UnityEngine_AnimationClip_Binding.Register(app);
+            ReferenceCollector_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_Transform_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_Transform_Binding.Register(app);
-            ET_UILayerScript_Binding.Register(app);
+            UnityEngine_Vector2_Binding.Register(app);
+            ET_TimeInfo_Binding.Register(app);
             ET_Options_Binding.Register(app);
             ET_Options_Binding.Register(app);
             System_Collections_Generic_List_1_Action_Binding.Register(app);
             System_Collections_Generic_List_1_Action_Binding.Register(app);
             System_Collections_Generic_List_1_Action_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_List_1_Action_Binding_Enumerator_Binding.Register(app);
             System_Action_Binding.Register(app);
             System_Action_Binding.Register(app);
             ET_MonoPool_Binding.Register(app);
             ET_MonoPool_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_Binding.Register(app);
+            LitJson_JsonMapper_Binding.Register(app);
             System_Collections_Generic_HashSet_1_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_HashSet_1_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_HashSet_1_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_HashSet_1_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_Binding_ValueCollection_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_Binding_ValueCollection_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding_ValueCollection_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding_ValueCollection_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding_ValueCollection_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding_ValueCollection_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
@@ -144,6 +130,7 @@ namespace ILRuntime.Runtime.Generated
             System_Collections_Generic_Dictionary_2_Type_Int32_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_Int32_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_KeyValuePair_2_Int64_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_KeyValuePair_2_Int64_ILTypeInstance_Binding.Register(app);
+            System_Linq_Enumerable_Binding.Register(app);
             System_Collections_Generic_IEnumerable_1_KeyValuePair_2_Type_Int32_Binding.Register(app);
             System_Collections_Generic_IEnumerable_1_KeyValuePair_2_Type_Int32_Binding.Register(app);
             System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Type_Int32_Binding.Register(app);
             System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Type_Int32_Binding.Register(app);
             System_Collections_Generic_KeyValuePair_2_Type_Int32_Binding.Register(app);
             System_Collections_Generic_KeyValuePair_2_Type_Int32_Binding.Register(app);
@@ -152,20 +139,23 @@ namespace ILRuntime.Runtime.Generated
             System_DateTime_Binding.Register(app);
             System_DateTime_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_Queue_1_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_Queue_1_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_Queue_1_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_Queue_1_ILTypeInstance_Binding.Register(app);
+            System_IO_MemoryStream_Binding.Register(app);
             ProtoBuf_Meta_RuntimeTypeModel_Binding.Register(app);
             ProtoBuf_Meta_RuntimeTypeModel_Binding.Register(app);
             ProtoBuf_Meta_TypeModel_Binding.Register(app);
             ProtoBuf_Meta_TypeModel_Binding.Register(app);
             ProtoBuf_Serializer_Binding.Register(app);
             ProtoBuf_Serializer_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_SortedDictionary_2_Int64_List_1_Int64_Binding.Register(app);
             System_Collections_Generic_SortedDictionary_2_Int64_List_1_Int64_Binding.Register(app);
             System_Collections_Generic_SortedDictionary_2_Int64_List_1_Int64_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_SortedDictionary_2_Int64_List_1_Int64_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_KeyValuePair_2_Int64_List_1_Int64_Binding.Register(app);
             System_Collections_Generic_KeyValuePair_2_Int64_List_1_Int64_Binding.Register(app);
             ET_MultiMap_2_Int64_Int64_Binding.Register(app);
             ET_MultiMap_2_Int64_Int64_Binding.Register(app);
+            System_Collections_Generic_List_1_Int64_Binding.Register(app);
             System_Collections_Generic_List_1_Int64_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_List_1_Int64_Binding_Enumerator_Binding.Register(app);
-            UnityEngine_Vector2_Binding.Register(app);
-            UnityEngine_Mathf_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_Binding_ValueCollection_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_Binding_ValueCollection_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_Binding_ValueCollection_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_Binding_ValueCollection_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_KeyValuePair_2_Int32_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_KeyValuePair_2_Int32_ILTypeInstance_Binding.Register(app);
+            System_Collections_Generic_List_1_Single_Binding.Register(app);
+            System_Collections_Generic_List_1_Int32_Binding.Register(app);
             System_Collections_Generic_Queue_1_ValueTuple_3_Int32_Int64_Int32_Binding.Register(app);
             System_Collections_Generic_Queue_1_ValueTuple_3_Int32_Int64_Int32_Binding.Register(app);
             System_Collections_Generic_SortedDictionary_2_Int64_List_1_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_SortedDictionary_2_Int64_List_1_ILTypeInstance_Binding.Register(app);
             System_ValueTuple_3_Int32_Int64_Int32_Binding.Register(app);
             System_ValueTuple_3_Int32_Int64_Int32_Binding.Register(app);
@@ -174,17 +164,18 @@ namespace ILRuntime.Runtime.Generated
             ET_MultiMap_2_Int64_ILTypeInstance_Binding.Register(app);
             ET_MultiMap_2_Int64_ILTypeInstance_Binding.Register(app);
             System_IO_Stream_Binding.Register(app);
             System_IO_Stream_Binding.Register(app);
             ET_ByteHelper_Binding.Register(app);
             ET_ByteHelper_Binding.Register(app);
-            ET_StringHelper_Binding.Register(app);
             System_ValueTuple_2_UInt16_MemoryStream_Binding.Register(app);
             System_ValueTuple_2_UInt16_MemoryStream_Binding.Register(app);
             System_Collections_Generic_HashSet_1_UInt16_Binding.Register(app);
             System_Collections_Generic_HashSet_1_UInt16_Binding.Register(app);
             ET_ILog_Binding.Register(app);
             ET_ILog_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_UInt16_Type_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_UInt16_Type_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_UInt16_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_UInt16_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_Type_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_Type_Binding.Register(app);
+            ET_RpcException_Binding.Register(app);
             ET_ErrorCore_Binding.Register(app);
             ET_ErrorCore_Binding.Register(app);
             System_Action_1_ILTypeInstance_Binding.Register(app);
             System_Action_1_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_Int64_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_Int64_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_List_1_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_List_1_ILTypeInstance_Binding.Register(app);
+            System_Single_Binding.Register(app);
             UnityEngine_Networking_UnityWebRequest_Binding.Register(app);
             UnityEngine_Networking_UnityWebRequest_Binding.Register(app);
             ET_AcceptAllCertificate_Binding.Register(app);
             ET_AcceptAllCertificate_Binding.Register(app);
             System_Collections_Generic_List_1_UnityWebRequest_Binding.Register(app);
             System_Collections_Generic_List_1_UnityWebRequest_Binding.Register(app);
@@ -193,7 +184,11 @@ namespace ILRuntime.Runtime.Generated
             System_Int64_Binding.Register(app);
             System_Int64_Binding.Register(app);
             UnityEngine_Networking_DownloadHandler_Binding.Register(app);
             UnityEngine_Networking_DownloadHandler_Binding.Register(app);
             System_IO_FileStream_Binding.Register(app);
             System_IO_FileStream_Binding.Register(app);
-            UnityEngine_Component_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_String_Object_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_String_Object_Binding_Enumerator_Binding.Register(app);
+            System_Collections_Generic_KeyValuePair_2_String_Object_Binding.Register(app);
+            UnityEngine_TextAsset_Binding.Register(app);
+            ET_CodeLoader_Binding.Register(app);
             UnityEngine_AssetBundle_Binding.Register(app);
             UnityEngine_AssetBundle_Binding.Register(app);
             ET_ETAsyncTaskMethodBuilder_1_AssetBundle_Binding.Register(app);
             ET_ETAsyncTaskMethodBuilder_1_AssetBundle_Binding.Register(app);
             ET_ETAsyncTaskMethodBuilder_1_Object_Array_Binding.Register(app);
             ET_ETAsyncTaskMethodBuilder_1_Object_Array_Binding.Register(app);
@@ -225,7 +220,16 @@ namespace ILRuntime.Runtime.Generated
             System_Collections_Generic_List_1_ETTask_Binding.Register(app);
             System_Collections_Generic_List_1_ETTask_Binding.Register(app);
             ET_ETTaskHelper_Binding.Register(app);
             ET_ETTaskHelper_Binding.Register(app);
             ET_ListComponent_1_String_Binding.Register(app);
             ET_ListComponent_1_String_Binding.Register(app);
-            ET_ComponentView_Binding.Register(app);
+            ET_ETTask_1_Int32_Binding.Register(app);
+            ET_NetworkHelper_Binding.Register(app);
+            ET_ETAsyncTaskMethodBuilder_1_Int32_Binding.Register(app);
+            System_BitConverter_Binding.Register(app);
+            UnityEngine_Input_Binding.Register(app);
+            UnityEngine_Physics_Binding.Register(app);
+            UnityEngine_RaycastHit_Binding.Register(app);
+            UnityEngine_UI_Button_Binding.Register(app);
+            UnityEngine_Events_UnityEvent_Binding.Register(app);
+            UnityEngine_UI_InputField_Binding.Register(app);
         }
         }
 
 
         /// <summary>
         /// <summary>

+ 19 - 37
Unity/Assets/Mono/ILRuntime/Generate/ET_AService_Binding.cs

@@ -23,12 +23,12 @@ namespace ILRuntime.Runtime.Generated
             FieldInfo field;
             FieldInfo field;
             Type[] args;
             Type[] args;
             Type type = typeof(ET.AService);
             Type type = typeof(ET.AService);
-            args = new Type[]{};
-            method = type.GetMethod("Destroy", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Destroy_0);
             args = new Type[]{typeof(System.Int64), typeof(System.Net.IPEndPoint)};
             args = new Type[]{typeof(System.Int64), typeof(System.Net.IPEndPoint)};
             method = type.GetMethod("GetOrCreate", flag, null, args, null);
             method = type.GetMethod("GetOrCreate", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetOrCreate_1);
+            app.RegisterCLRMethodRedirection(method, GetOrCreate_0);
+            args = new Type[]{};
+            method = type.GetMethod("Destroy", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Destroy_1);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("Update", flag, null, args, null);
             method = type.GetMethod("Update", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, Update_2);
             app.RegisterCLRMethodRedirection(method, Update_2);
@@ -38,12 +38,9 @@ namespace ILRuntime.Runtime.Generated
             args = new Type[]{typeof(System.Int64)};
             args = new Type[]{typeof(System.Int64)};
             method = type.GetMethod("RemoveChannel", flag, null, args, null);
             method = type.GetMethod("RemoveChannel", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, RemoveChannel_4);
             app.RegisterCLRMethodRedirection(method, RemoveChannel_4);
-            args = new Type[]{};
-            method = type.GetMethod("get_ServiceType", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_ServiceType_5);
             args = new Type[]{typeof(System.Int64), typeof(System.Int64), typeof(System.IO.MemoryStream)};
             args = new Type[]{typeof(System.Int64), typeof(System.Int64), typeof(System.IO.MemoryStream)};
             method = type.GetMethod("SendStream", flag, null, args, null);
             method = type.GetMethod("SendStream", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, SendStream_6);
+            app.RegisterCLRMethodRedirection(method, SendStream_5);
 
 
             field = type.GetField("ErrorCallback", flag);
             field = type.GetField("ErrorCallback", flag);
             app.RegisterCLRFieldGetter(field, get_ErrorCallback_0);
             app.RegisterCLRFieldGetter(field, get_ErrorCallback_0);
@@ -62,39 +59,39 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* Destroy_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetOrCreate_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 3);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Net.IPEndPoint @address = (System.Net.IPEndPoint)typeof(System.Net.IPEndPoint).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Int64 @id = *(long*)&ptr_of_this_method->Value;
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ET.AService instance_of_this_method = (ET.AService)typeof(ET.AService).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.AService instance_of_this_method = (ET.AService)typeof(ET.AService).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.Destroy();
+            instance_of_this_method.GetOrCreate(@id, @address);
 
 
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* GetOrCreate_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Destroy_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 3);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Net.IPEndPoint @address = (System.Net.IPEndPoint)typeof(System.Net.IPEndPoint).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.Int64 @id = *(long*)&ptr_of_this_method->Value;
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ET.AService instance_of_this_method = (ET.AService)typeof(ET.AService).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.AService instance_of_this_method = (ET.AService)typeof(ET.AService).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.GetOrCreate(@id, @address);
+            instance_of_this_method.Destroy();
 
 
             return __ret;
             return __ret;
         }
         }
@@ -149,22 +146,7 @@ namespace ILRuntime.Runtime.Generated
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* get_ServiceType_5(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);
-            ET.AService instance_of_this_method = (ET.AService)typeof(ET.AService).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = instance_of_this_method.ServiceType;
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* SendStream_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* SendStream_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;

+ 0 - 25
Unity/Assets/Mono/ILRuntime/Generate/ET_ByteHelper_Binding.cs

@@ -28,9 +28,6 @@ namespace ILRuntime.Runtime.Generated
             args = new Type[]{typeof(System.Byte[]), typeof(System.Int32), typeof(System.UInt16)};
             args = new Type[]{typeof(System.Byte[]), typeof(System.Int32), typeof(System.UInt16)};
             method = type.GetMethod("WriteTo", flag, null, args, null);
             method = type.GetMethod("WriteTo", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, WriteTo_1);
             app.RegisterCLRMethodRedirection(method, WriteTo_1);
-            args = new Type[]{typeof(System.Byte[]), typeof(System.Int32), typeof(System.Int64)};
-            method = type.GetMethod("WriteTo", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, WriteTo_2);
 
 
 
 
         }
         }
@@ -80,28 +77,6 @@ namespace ILRuntime.Runtime.Generated
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* WriteTo_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, 3);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Int64 @num = *(long*)&ptr_of_this_method->Value;
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.Int32 @offset = 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), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-
-            ET.ByteHelper.WriteTo(@bytes, @offset, @num);
-
-            return __ret;
-        }
-
 
 
 
 
     }
     }

+ 10 - 10
Unity/Assets/Mono/ILRuntime/Generate/ET_CodeLoader_Binding.cs

@@ -24,11 +24,11 @@ namespace ILRuntime.Runtime.Generated
             Type[] args;
             Type[] args;
             Type type = typeof(ET.CodeLoader);
             Type type = typeof(ET.CodeLoader);
             args = new Type[]{};
             args = new Type[]{};
-            method = type.GetMethod("LoadLogic", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, LoadLogic_0);
-            args = new Type[]{};
             method = type.GetMethod("GetTypes", flag, null, args, null);
             method = type.GetMethod("GetTypes", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetTypes_1);
+            app.RegisterCLRMethodRedirection(method, GetTypes_0);
+            args = new Type[]{};
+            method = type.GetMethod("LoadLogic", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, LoadLogic_1);
 
 
             field = type.GetField("Instance", flag);
             field = type.GetField("Instance", flag);
             app.RegisterCLRFieldGetter(field, get_Instance_0);
             app.RegisterCLRFieldGetter(field, get_Instance_0);
@@ -51,7 +51,7 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* LoadLogic_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetTypes_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -61,12 +61,12 @@ namespace ILRuntime.Runtime.Generated
             ET.CodeLoader instance_of_this_method = (ET.CodeLoader)typeof(ET.CodeLoader).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.CodeLoader instance_of_this_method = (ET.CodeLoader)typeof(ET.CodeLoader).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.LoadLogic();
+            var result_of_this_method = instance_of_this_method.GetTypes();
 
 
-            return __ret;
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* GetTypes_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* LoadLogic_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -76,9 +76,9 @@ namespace ILRuntime.Runtime.Generated
             ET.CodeLoader instance_of_this_method = (ET.CodeLoader)typeof(ET.CodeLoader).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.CodeLoader instance_of_this_method = (ET.CodeLoader)typeof(ET.CodeLoader).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.GetTypes();
+            instance_of_this_method.LoadLogic();
 
 
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+            return __ret;
         }
         }
 
 
 
 

+ 35 - 35
Unity/Assets/Mono/ILRuntime/Generate/ET_ETAsyncTaskMethodBuilder_Binding.cs

@@ -56,12 +56,12 @@ namespace ILRuntime.Runtime.Generated
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("get_Task", flag, null, args, null);
             method = type.GetMethod("get_Task", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, get_Task_2);
             app.RegisterCLRMethodRedirection(method, get_Task_2);
-            args = new Type[]{typeof(ET.ETTask<System.Boolean>), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
+            args = new Type[]{typeof(System.Runtime.CompilerServices.TaskAwaiter), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(void), typeof(ET.ETTask<System.Boolean>).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
+                    if(m.MatchGenericParameters(args, typeof(void), typeof(System.Runtime.CompilerServices.TaskAwaiter).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_3);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_3);
@@ -76,12 +76,12 @@ namespace ILRuntime.Runtime.Generated
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("SetResult", flag, null, args, null);
             method = type.GetMethod("SetResult", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, SetResult_5);
             app.RegisterCLRMethodRedirection(method, SetResult_5);
-            args = new Type[]{typeof(ET.ETTask<System.Int32>), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
+            args = new Type[]{typeof(ET.ETTaskCompleted), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(void), typeof(ET.ETTask<System.Int32>).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
+                    if(m.MatchGenericParameters(args, typeof(void), typeof(ET.ETTaskCompleted).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_6);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_6);
@@ -90,12 +90,12 @@ namespace ILRuntime.Runtime.Generated
                     }
                     }
                 }
                 }
             }
             }
-            args = new Type[]{typeof(ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
+            args = new Type[]{typeof(ET.ETTask), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(void), typeof(ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
+                    if(m.MatchGenericParameters(args, typeof(void), typeof(ET.ETTask).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_7);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_7);
@@ -104,12 +104,12 @@ namespace ILRuntime.Runtime.Generated
                     }
                     }
                 }
                 }
             }
             }
-            args = new Type[]{typeof(ET.ETTask), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
+            args = new Type[]{typeof(ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(void), typeof(ET.ETTask).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
+                    if(m.MatchGenericParameters(args, typeof(void), typeof(ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_8);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_8);
@@ -118,12 +118,12 @@ namespace ILRuntime.Runtime.Generated
                     }
                     }
                 }
                 }
             }
             }
-            args = new Type[]{typeof(ET.ETTaskCompleted), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
+            args = new Type[]{typeof(ET.ETTask<System.Boolean>), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(void), typeof(ET.ETTaskCompleted).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
+                    if(m.MatchGenericParameters(args, typeof(void), typeof(ET.ETTask<System.Boolean>).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_9);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_9);
@@ -132,12 +132,12 @@ namespace ILRuntime.Runtime.Generated
                     }
                     }
                 }
                 }
             }
             }
-            args = new Type[]{typeof(System.Runtime.CompilerServices.TaskAwaiter), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
+            args = new Type[]{typeof(ET.ETTask<UnityEngine.Object[]>), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(void), typeof(System.Runtime.CompilerServices.TaskAwaiter).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
+                    if(m.MatchGenericParameters(args, typeof(void), typeof(ET.ETTask<UnityEngine.Object[]>).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_10);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_10);
@@ -146,12 +146,12 @@ namespace ILRuntime.Runtime.Generated
                     }
                     }
                 }
                 }
             }
             }
-            args = new Type[]{typeof(ET.ETTask<UnityEngine.Object[]>), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
+            args = new Type[]{typeof(ET.ETTask<System.Int32>), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(void), typeof(ET.ETTask<UnityEngine.Object[]>).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
+                    if(m.MatchGenericParameters(args, typeof(void), typeof(ET.ETTask<System.Int32>).MakeByRefType(), typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType()))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_11);
                         app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_11);
@@ -327,13 +327,13 @@ namespace ILRuntime.Runtime.Generated
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            ET.ETTask<System.Boolean> @awaiter = (ET.ETTask<System.Boolean>)typeof(ET.ETTask<System.Boolean>).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.Runtime.CompilerServices.TaskAwaiter @awaiter = (System.Runtime.CompilerServices.TaskAwaiter)typeof(System.Runtime.CompilerServices.TaskAwaiter).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
 
 
-            instance_of_this_method.AwaitUnsafeOnCompleted<ET.ETTask<System.Boolean>, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
+            instance_of_this_method.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             switch(ptr_of_this_method->ObjectType)
             switch(ptr_of_this_method->ObjectType)
@@ -438,7 +438,7 @@ namespace ILRuntime.Runtime.Generated
                     break;
                     break;
                  case ObjectTypes.ArrayReference:
                  case ObjectTypes.ArrayReference:
                     {
                     {
-                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ET.ETTask<System.Boolean>[];
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Runtime.CompilerServices.TaskAwaiter[];
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                     }
                     }
                     break;
                     break;
@@ -504,13 +504,13 @@ namespace ILRuntime.Runtime.Generated
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            ET.ETTask<System.Int32> @awaiter = (ET.ETTask<System.Int32>)typeof(ET.ETTask<System.Int32>).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            ET.ETTaskCompleted @awaiter = (ET.ETTaskCompleted)typeof(ET.ETTaskCompleted).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
 
 
-            instance_of_this_method.AwaitUnsafeOnCompleted<ET.ETTask<System.Int32>, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
+            instance_of_this_method.AwaitUnsafeOnCompleted<ET.ETTaskCompleted, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             switch(ptr_of_this_method->ObjectType)
             switch(ptr_of_this_method->ObjectType)
@@ -615,7 +615,7 @@ namespace ILRuntime.Runtime.Generated
                     break;
                     break;
                  case ObjectTypes.ArrayReference:
                  case ObjectTypes.ArrayReference:
                     {
                     {
-                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ET.ETTask<System.Int32>[];
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ET.ETTaskCompleted[];
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                     }
                     }
                     break;
                     break;
@@ -639,13 +639,13 @@ namespace ILRuntime.Runtime.Generated
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance> @awaiter = (ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            ET.ETTask @awaiter = (ET.ETTask)typeof(ET.ETTask).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
 
 
-            instance_of_this_method.AwaitUnsafeOnCompleted<ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
+            instance_of_this_method.AwaitUnsafeOnCompleted<ET.ETTask, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             switch(ptr_of_this_method->ObjectType)
             switch(ptr_of_this_method->ObjectType)
@@ -750,7 +750,7 @@ namespace ILRuntime.Runtime.Generated
                     break;
                     break;
                  case ObjectTypes.ArrayReference:
                  case ObjectTypes.ArrayReference:
                     {
                     {
-                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>[];
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ET.ETTask[];
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                     }
                     }
                     break;
                     break;
@@ -774,13 +774,13 @@ namespace ILRuntime.Runtime.Generated
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            ET.ETTask @awaiter = (ET.ETTask)typeof(ET.ETTask).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance> @awaiter = (ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
 
 
-            instance_of_this_method.AwaitUnsafeOnCompleted<ET.ETTask, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
+            instance_of_this_method.AwaitUnsafeOnCompleted<ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             switch(ptr_of_this_method->ObjectType)
             switch(ptr_of_this_method->ObjectType)
@@ -885,7 +885,7 @@ namespace ILRuntime.Runtime.Generated
                     break;
                     break;
                  case ObjectTypes.ArrayReference:
                  case ObjectTypes.ArrayReference:
                     {
                     {
-                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ET.ETTask[];
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>[];
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                     }
                     }
                     break;
                     break;
@@ -909,13 +909,13 @@ namespace ILRuntime.Runtime.Generated
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            ET.ETTaskCompleted @awaiter = (ET.ETTaskCompleted)typeof(ET.ETTaskCompleted).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
+            ET.ETTask<System.Boolean> @awaiter = (ET.ETTask<System.Boolean>)typeof(ET.ETTask<System.Boolean>).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
 
 
-            instance_of_this_method.AwaitUnsafeOnCompleted<ET.ETTaskCompleted, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
+            instance_of_this_method.AwaitUnsafeOnCompleted<ET.ETTask<System.Boolean>, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             switch(ptr_of_this_method->ObjectType)
             switch(ptr_of_this_method->ObjectType)
@@ -1020,7 +1020,7 @@ namespace ILRuntime.Runtime.Generated
                     break;
                     break;
                  case ObjectTypes.ArrayReference:
                  case ObjectTypes.ArrayReference:
                     {
                     {
-                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ET.ETTaskCompleted[];
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ET.ETTask<System.Boolean>[];
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                     }
                     }
                     break;
                     break;
@@ -1044,13 +1044,13 @@ namespace ILRuntime.Runtime.Generated
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.Runtime.CompilerServices.TaskAwaiter @awaiter = (System.Runtime.CompilerServices.TaskAwaiter)typeof(System.Runtime.CompilerServices.TaskAwaiter).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
+            ET.ETTask<UnityEngine.Object[]> @awaiter = (ET.ETTask<UnityEngine.Object[]>)typeof(ET.ETTask<UnityEngine.Object[]>).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
 
 
-            instance_of_this_method.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
+            instance_of_this_method.AwaitUnsafeOnCompleted<ET.ETTask<UnityEngine.Object[]>, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             switch(ptr_of_this_method->ObjectType)
             switch(ptr_of_this_method->ObjectType)
@@ -1155,7 +1155,7 @@ namespace ILRuntime.Runtime.Generated
                     break;
                     break;
                  case ObjectTypes.ArrayReference:
                  case ObjectTypes.ArrayReference:
                     {
                     {
-                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Runtime.CompilerServices.TaskAwaiter[];
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ET.ETTask<UnityEngine.Object[]>[];
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                     }
                     }
                     break;
                     break;
@@ -1179,13 +1179,13 @@ namespace ILRuntime.Runtime.Generated
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            ET.ETTask<UnityEngine.Object[]> @awaiter = (ET.ETTask<UnityEngine.Object[]>)typeof(ET.ETTask<UnityEngine.Object[]>).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            ET.ETTask<System.Int32> @awaiter = (ET.ETTask<System.Int32>)typeof(ET.ETTask<System.Int32>).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
             ET.ETAsyncTaskMethodBuilder instance_of_this_method = (ET.ETAsyncTaskMethodBuilder)typeof(ET.ETAsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
 
 
-            instance_of_this_method.AwaitUnsafeOnCompleted<ET.ETTask<UnityEngine.Object[]>, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
+            instance_of_this_method.AwaitUnsafeOnCompleted<ET.ETTask<System.Int32>, ET.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             switch(ptr_of_this_method->ObjectType)
             switch(ptr_of_this_method->ObjectType)
@@ -1290,7 +1290,7 @@ namespace ILRuntime.Runtime.Generated
                     break;
                     break;
                  case ObjectTypes.ArrayReference:
                  case ObjectTypes.ArrayReference:
                     {
                     {
-                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ET.ETTask<UnityEngine.Object[]>[];
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ET.ETTask<System.Int32>[];
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                         instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
                     }
                     }
                     break;
                     break;

+ 43 - 43
Unity/Assets/Mono/ILRuntime/Generate/ET_ETTask_1_Boolean_Binding.cs

@@ -23,29 +23,29 @@ namespace ILRuntime.Runtime.Generated
             Type[] args;
             Type[] args;
             Type type = typeof(ET.ETTask<System.Boolean>);
             Type type = typeof(ET.ETTask<System.Boolean>);
             args = new Type[]{};
             args = new Type[]{};
-            method = type.GetMethod("GetAwaiter", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetAwaiter_0);
-            args = new Type[]{};
-            method = type.GetMethod("get_IsCompleted", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_IsCompleted_1);
-            args = new Type[]{};
-            method = type.GetMethod("GetResult", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetResult_2);
-            args = new Type[]{};
             method = type.GetMethod("Coroutine", flag, null, args, null);
             method = type.GetMethod("Coroutine", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Coroutine_3);
+            app.RegisterCLRMethodRedirection(method, Coroutine_0);
             args = new Type[]{typeof(System.Boolean)};
             args = new Type[]{typeof(System.Boolean)};
             method = type.GetMethod("SetResult", flag, null, args, null);
             method = type.GetMethod("SetResult", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, SetResult_4);
+            app.RegisterCLRMethodRedirection(method, SetResult_1);
             args = new Type[]{typeof(System.Boolean)};
             args = new Type[]{typeof(System.Boolean)};
             method = type.GetMethod("Create", flag, null, args, null);
             method = type.GetMethod("Create", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Create_5);
+            app.RegisterCLRMethodRedirection(method, Create_2);
+            args = new Type[]{};
+            method = type.GetMethod("GetAwaiter", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, GetAwaiter_3);
+            args = new Type[]{};
+            method = type.GetMethod("get_IsCompleted", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_IsCompleted_4);
+            args = new Type[]{};
+            method = type.GetMethod("GetResult", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, GetResult_5);
 
 
 
 
         }
         }
 
 
 
 
-        static StackObject* GetAwaiter_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Coroutine_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -55,46 +55,45 @@ namespace ILRuntime.Runtime.Generated
             ET.ETTask<System.Boolean> instance_of_this_method = (ET.ETTask<System.Boolean>)typeof(ET.ETTask<System.Boolean>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.ETTask<System.Boolean> instance_of_this_method = (ET.ETTask<System.Boolean>)typeof(ET.ETTask<System.Boolean>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.GetAwaiter();
+            instance_of_this_method.Coroutine();
 
 
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+            return __ret;
         }
         }
 
 
-        static StackObject* get_IsCompleted_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* SetResult_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Boolean @result = ptr_of_this_method->Value == 1;
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ET.ETTask<System.Boolean> instance_of_this_method = (ET.ETTask<System.Boolean>)typeof(ET.ETTask<System.Boolean>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.ETTask<System.Boolean> instance_of_this_method = (ET.ETTask<System.Boolean>)typeof(ET.ETTask<System.Boolean>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.IsCompleted;
+            instance_of_this_method.SetResult(@result);
 
 
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method ? 1 : 0;
-            return __ret + 1;
+            return __ret;
         }
         }
 
 
-        static StackObject* GetResult_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Create_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            ET.ETTask<System.Boolean> instance_of_this_method = (ET.ETTask<System.Boolean>)typeof(ET.ETTask<System.Boolean>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
+            System.Boolean @fromPool = ptr_of_this_method->Value == 1;
 
 
-            var result_of_this_method = instance_of_this_method.GetResult();
 
 
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method ? 1 : 0;
-            return __ret + 1;
+            var result_of_this_method = ET.ETTask<System.Boolean>.Create(@fromPool);
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* Coroutine_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetAwaiter_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -104,42 +103,43 @@ namespace ILRuntime.Runtime.Generated
             ET.ETTask<System.Boolean> instance_of_this_method = (ET.ETTask<System.Boolean>)typeof(ET.ETTask<System.Boolean>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.ETTask<System.Boolean> instance_of_this_method = (ET.ETTask<System.Boolean>)typeof(ET.ETTask<System.Boolean>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.Coroutine();
+            var result_of_this_method = instance_of_this_method.GetAwaiter();
 
 
-            return __ret;
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* SetResult_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_IsCompleted_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Boolean @result = ptr_of_this_method->Value == 1;
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ET.ETTask<System.Boolean> instance_of_this_method = (ET.ETTask<System.Boolean>)typeof(ET.ETTask<System.Boolean>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.ETTask<System.Boolean> instance_of_this_method = (ET.ETTask<System.Boolean>)typeof(ET.ETTask<System.Boolean>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.SetResult(@result);
+            var result_of_this_method = instance_of_this_method.IsCompleted;
 
 
-            return __ret;
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method ? 1 : 0;
+            return __ret + 1;
         }
         }
 
 
-        static StackObject* Create_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetResult_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Boolean @fromPool = ptr_of_this_method->Value == 1;
-
+            ET.ETTask<System.Boolean> instance_of_this_method = (ET.ETTask<System.Boolean>)typeof(ET.ETTask<System.Boolean>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = ET.ETTask<System.Boolean>.Create(@fromPool);
+            var result_of_this_method = instance_of_this_method.GetResult();
 
 
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method ? 1 : 0;
+            return __ret + 1;
         }
         }
 
 
 
 

+ 18 - 0
Unity/Assets/Mono/ILRuntime/Generate/ET_ETTask_1_ILTypeInstance_Binding.cs

@@ -40,6 +40,9 @@ namespace ILRuntime.Runtime.Generated
             args = new Type[]{typeof(System.Exception)};
             args = new Type[]{typeof(System.Exception)};
             method = type.GetMethod("SetException", flag, null, args, null);
             method = type.GetMethod("SetException", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, SetException_5);
             app.RegisterCLRMethodRedirection(method, SetException_5);
+            args = new Type[]{};
+            method = type.GetMethod("Coroutine", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Coroutine_6);
 
 
 
 
         }
         }
@@ -145,6 +148,21 @@ namespace ILRuntime.Runtime.Generated
             return __ret;
             return __ret;
         }
         }
 
 
+        static StackObject* Coroutine_6(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);
+            ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(ET.ETTask<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Coroutine();
+
+            return __ret;
+        }
+
 
 
 
 
     }
     }

+ 40 - 40
Unity/Assets/Mono/ILRuntime/Generate/ET_ETTask_Binding.cs

@@ -26,23 +26,23 @@ namespace ILRuntime.Runtime.Generated
             method = type.GetMethod("Coroutine", flag, null, args, null);
             method = type.GetMethod("Coroutine", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, Coroutine_0);
             app.RegisterCLRMethodRedirection(method, Coroutine_0);
             args = new Type[]{};
             args = new Type[]{};
-            method = type.GetMethod("GetAwaiter", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetAwaiter_1);
-            args = new Type[]{};
-            method = type.GetMethod("get_IsCompleted", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_IsCompleted_2);
-            args = new Type[]{};
-            method = type.GetMethod("GetResult", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetResult_3);
-            args = new Type[]{};
             method = type.GetMethod("get_CompletedTask", flag, null, args, null);
             method = type.GetMethod("get_CompletedTask", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_CompletedTask_4);
+            app.RegisterCLRMethodRedirection(method, get_CompletedTask_1);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("SetResult", flag, null, args, null);
             method = type.GetMethod("SetResult", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, SetResult_5);
+            app.RegisterCLRMethodRedirection(method, SetResult_2);
             args = new Type[]{typeof(System.Boolean)};
             args = new Type[]{typeof(System.Boolean)};
             method = type.GetMethod("Create", flag, null, args, null);
             method = type.GetMethod("Create", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Create_6);
+            app.RegisterCLRMethodRedirection(method, Create_3);
+            args = new Type[]{};
+            method = type.GetMethod("GetAwaiter", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, GetAwaiter_4);
+            args = new Type[]{};
+            method = type.GetMethod("get_IsCompleted", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_IsCompleted_5);
+            args = new Type[]{};
+            method = type.GetMethod("GetResult", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, GetResult_6);
             args = new Type[]{typeof(System.Exception)};
             args = new Type[]{typeof(System.Exception)};
             method = type.GetMethod("SetException", flag, null, args, null);
             method = type.GetMethod("SetException", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, SetException_7);
             app.RegisterCLRMethodRedirection(method, SetException_7);
@@ -66,22 +66,18 @@ namespace ILRuntime.Runtime.Generated
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* GetAwaiter_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_CompletedTask_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
 
 
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            ET.ETTask instance_of_this_method = (ET.ETTask)typeof(ET.ETTask).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.GetAwaiter();
+            var result_of_this_method = ET.ETTask.CompletedTask;
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* get_IsCompleted_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* SetResult_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -91,40 +87,42 @@ namespace ILRuntime.Runtime.Generated
             ET.ETTask instance_of_this_method = (ET.ETTask)typeof(ET.ETTask).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.ETTask instance_of_this_method = (ET.ETTask)typeof(ET.ETTask).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.IsCompleted;
+            instance_of_this_method.SetResult();
 
 
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method ? 1 : 0;
-            return __ret + 1;
+            return __ret;
         }
         }
 
 
-        static StackObject* GetResult_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Create_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            ET.ETTask instance_of_this_method = (ET.ETTask)typeof(ET.ETTask).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
+            System.Boolean @fromPool = ptr_of_this_method->Value == 1;
 
 
-            instance_of_this_method.GetResult();
 
 
-            return __ret;
+            var result_of_this_method = ET.ETTask.Create(@fromPool);
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* get_CompletedTask_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetAwaiter_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
+            StackObject* ptr_of_this_method;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            ET.ETTask instance_of_this_method = (ET.ETTask)typeof(ET.ETTask).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = ET.ETTask.CompletedTask;
+            var result_of_this_method = instance_of_this_method.GetAwaiter();
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* SetResult_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_IsCompleted_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -134,24 +132,26 @@ namespace ILRuntime.Runtime.Generated
             ET.ETTask instance_of_this_method = (ET.ETTask)typeof(ET.ETTask).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.ETTask instance_of_this_method = (ET.ETTask)typeof(ET.ETTask).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.SetResult();
+            var result_of_this_method = instance_of_this_method.IsCompleted;
 
 
-            return __ret;
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method ? 1 : 0;
+            return __ret + 1;
         }
         }
 
 
-        static StackObject* Create_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetResult_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Boolean @fromPool = ptr_of_this_method->Value == 1;
-
+            ET.ETTask instance_of_this_method = (ET.ETTask)typeof(ET.ETTask).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = ET.ETTask.Create(@fromPool);
+            instance_of_this_method.GetResult();
 
 
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+            return __ret;
         }
         }
 
 
         static StackObject* SetException_7(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         static StackObject* SetException_7(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)

+ 12 - 12
Unity/Assets/Mono/ILRuntime/Generate/ET_Log_Binding.cs

@@ -23,17 +23,17 @@ namespace ILRuntime.Runtime.Generated
             Type[] args;
             Type[] args;
             Type type = typeof(ET.Log);
             Type type = typeof(ET.Log);
             args = new Type[]{typeof(System.String)};
             args = new Type[]{typeof(System.String)};
-            method = type.GetMethod("Debug", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Debug_0);
+            method = type.GetMethod("Error", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Error_0);
             args = new Type[]{typeof(System.Exception)};
             args = new Type[]{typeof(System.Exception)};
             method = type.GetMethod("Error", flag, null, args, null);
             method = type.GetMethod("Error", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, Error_1);
             app.RegisterCLRMethodRedirection(method, Error_1);
             args = new Type[]{typeof(System.String)};
             args = new Type[]{typeof(System.String)};
-            method = type.GetMethod("Error", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Error_2);
-            args = new Type[]{typeof(System.String)};
             method = type.GetMethod("Info", flag, null, args, null);
             method = type.GetMethod("Info", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Info_3);
+            app.RegisterCLRMethodRedirection(method, Info_2);
+            args = new Type[]{typeof(System.String)};
+            method = type.GetMethod("Debug", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Debug_3);
             args = new Type[]{typeof(System.String)};
             args = new Type[]{typeof(System.String)};
             method = type.GetMethod("Warning", flag, null, args, null);
             method = type.GetMethod("Warning", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, Warning_4);
             app.RegisterCLRMethodRedirection(method, Warning_4);
@@ -45,7 +45,7 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* Debug_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Error_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -56,7 +56,7 @@ namespace ILRuntime.Runtime.Generated
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
 
 
-            ET.Log.Debug(@msg);
+            ET.Log.Error(@msg);
 
 
             return __ret;
             return __ret;
         }
         }
@@ -77,7 +77,7 @@ namespace ILRuntime.Runtime.Generated
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* Error_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Info_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -88,12 +88,12 @@ namespace ILRuntime.Runtime.Generated
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
 
 
-            ET.Log.Error(@msg);
+            ET.Log.Info(@msg);
 
 
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* Info_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Debug_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -104,7 +104,7 @@ namespace ILRuntime.Runtime.Generated
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
 
 
-            ET.Log.Info(@msg);
+            ET.Log.Debug(@msg);
 
 
             return __ret;
             return __ret;
         }
         }

+ 53 - 0
Unity/Assets/Mono/ILRuntime/Generate/ET_MathHelper_Binding.cs

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+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 ET_MathHelper_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            Type[] args;
+            Type type = typeof(ET.MathHelper);
+            args = new Type[]{typeof(System.Single)};
+            method = type.GetMethod("DegToRad", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, DegToRad_0);
+
+
+        }
+
+
+        static StackObject* DegToRad_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.Single @degrees = *(float*)&ptr_of_this_method->Value;
+
+
+            var result_of_this_method = ET.MathHelper.DegToRad(@degrees);
+
+            __ret->ObjectType = ObjectTypes.Float;
+            *(float*)&__ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+
+
+    }
+}

+ 1 - 1
Unity/Assets/Mono/ILRuntime/Generate/ET_UILayerScript_Binding.cs.meta → Unity/Assets/Mono/ILRuntime/Generate/ET_MathHelper_Binding.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
 fileFormatVersion: 2
-guid: 84c374ac8b8909040a16e0b31a58e294
+guid: 16d534a0e287d5a428f5d5daec0f2337
 MonoImporter:
 MonoImporter:
   externalObjects: {}
   externalObjects: {}
   serializedVersion: 2
   serializedVersion: 2

+ 23 - 0
Unity/Assets/Mono/ILRuntime/Generate/ET_RandomHelper_Binding.cs

@@ -25,6 +25,9 @@ namespace ILRuntime.Runtime.Generated
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("RandInt64", flag, null, args, null);
             method = type.GetMethod("RandInt64", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, RandInt64_0);
             app.RegisterCLRMethodRedirection(method, RandInt64_0);
+            args = new Type[]{typeof(System.Int32), typeof(System.Int32)};
+            method = type.GetMethod("RandomNumber", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, RandomNumber_1);
 
 
 
 
         }
         }
@@ -43,6 +46,26 @@ namespace ILRuntime.Runtime.Generated
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
+        static StackObject* RandomNumber_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.Int32 @upper = ptr_of_this_method->Value;
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Int32 @lower = ptr_of_this_method->Value;
+
+
+            var result_of_this_method = ET.RandomHelper.RandomNumber(@lower, @upper);
+
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
 
 
 
 
     }
     }

+ 128 - 0
Unity/Assets/Mono/ILRuntime/Generate/ET_Recast_Binding.cs

@@ -0,0 +1,128 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+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 ET_Recast_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            Type[] args;
+            Type type = typeof(ET.Recast);
+            args = new Type[]{typeof(System.Int32), typeof(System.Byte[]), typeof(System.Int32)};
+            method = type.GetMethod("RecastLoadLong", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, RecastLoadLong_0);
+            args = new Type[]{typeof(System.Int64), typeof(System.Single[]), typeof(System.Single[]), typeof(System.Single[]), typeof(System.Single[])};
+            method = type.GetMethod("RecastFind", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, RecastFind_1);
+            args = new Type[]{typeof(System.Int64), typeof(System.Single[]), typeof(System.Single[]), typeof(System.Single[])};
+            method = type.GetMethod("RecastFindNearestPoint", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, RecastFindNearestPoint_2);
+
+
+        }
+
+
+        static StackObject* RecastLoadLong_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.Int32 @n = ptr_of_this_method->Value;
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Byte[] @buffer = (System.Byte[])typeof(System.Byte[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            System.Int32 @id = ptr_of_this_method->Value;
+
+
+            var result_of_this_method = ET.Recast.RecastLoadLong(@id, @buffer, @n);
+
+            __ret->ObjectType = ObjectTypes.Long;
+            *(long*)&__ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+        static StackObject* RecastFind_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, 5);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Single[] @straightPath = (System.Single[])typeof(System.Single[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Single[] @endPos = (System.Single[])typeof(System.Single[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            System.Single[] @startPos = (System.Single[])typeof(System.Single[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
+            System.Single[] @extents = (System.Single[])typeof(System.Single[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 5);
+            System.Int64 @navPtr = *(long*)&ptr_of_this_method->Value;
+
+
+            var result_of_this_method = ET.Recast.RecastFind(@navPtr, @extents, @startPos, @endPos, @straightPath);
+
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+        static StackObject* RecastFindNearestPoint_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, 4);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Single[] @nearestPos = (System.Single[])typeof(System.Single[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Single[] @pos = (System.Single[])typeof(System.Single[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            System.Single[] @extents = (System.Single[])typeof(System.Single[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
+            System.Int64 @navPtr = *(long*)&ptr_of_this_method->Value;
+
+
+            var result_of_this_method = ET.Recast.RecastFindNearestPoint(@navPtr, @extents, @pos, @nearestPos);
+
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+
+
+    }
+}

+ 11 - 0
Unity/Assets/Mono/ILRuntime/Generate/ET_Recast_Binding.cs.meta

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

+ 46 - 2
Unity/Assets/Mono/ILRuntime/Generate/ET_StringHelper_Binding.cs

@@ -22,15 +22,59 @@ namespace ILRuntime.Runtime.Generated
             MethodBase method;
             MethodBase method;
             Type[] args;
             Type[] args;
             Type type = typeof(ET.StringHelper);
             Type type = typeof(ET.StringHelper);
+            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(System.Single)};
+            if (genericMethods.TryGetValue("ArrayToString", out lst))
+            {
+                foreach(var m in lst)
+                {
+                    if(m.MatchGenericParameters(args, typeof(System.String), typeof(System.Single[])))
+                    {
+                        method = m.MakeGenericMethod(args);
+                        app.RegisterCLRMethodRedirection(method, ArrayToString_0);
+
+                        break;
+                    }
+                }
+            }
             args = new Type[]{typeof(System.String)};
             args = new Type[]{typeof(System.String)};
             method = type.GetMethod("ToUtf8", flag, null, args, null);
             method = type.GetMethod("ToUtf8", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, ToUtf8_0);
+            app.RegisterCLRMethodRedirection(method, ToUtf8_1);
 
 
 
 
         }
         }
 
 
 
 
-        static StackObject* ToUtf8_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* ArrayToString_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.Single[] @args = (System.Single[])typeof(System.Single[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+
+            var result_of_this_method = ET.StringHelper.ArrayToString<System.Single>(@args);
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+        static StackObject* ToUtf8_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;

+ 16 - 16
Unity/Assets/Mono/ILRuntime/Generate/ET_ThreadSynchronizationContext_Binding.cs

@@ -22,12 +22,12 @@ namespace ILRuntime.Runtime.Generated
             MethodBase method;
             MethodBase method;
             Type[] args;
             Type[] args;
             Type type = typeof(ET.ThreadSynchronizationContext);
             Type type = typeof(ET.ThreadSynchronizationContext);
-            args = new Type[]{};
-            method = type.GetMethod("get_Instance", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Instance_0);
             args = new Type[]{typeof(System.Action)};
             args = new Type[]{typeof(System.Action)};
             method = type.GetMethod("PostNext", flag, null, args, null);
             method = type.GetMethod("PostNext", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, PostNext_1);
+            app.RegisterCLRMethodRedirection(method, PostNext_0);
+            args = new Type[]{};
+            method = type.GetMethod("get_Instance", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_Instance_1);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("Update", flag, null, args, null);
             method = type.GetMethod("Update", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, Update_2);
             app.RegisterCLRMethodRedirection(method, Update_2);
@@ -36,18 +36,7 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* get_Instance_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
-
-
-            var result_of_this_method = ET.ThreadSynchronizationContext.Instance;
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* PostNext_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* PostNext_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -66,6 +55,17 @@ namespace ILRuntime.Runtime.Generated
             return __ret;
             return __ret;
         }
         }
 
 
+        static StackObject* get_Instance_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
+
+
+            var result_of_this_method = ET.ThreadSynchronizationContext.Instance;
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
         static StackObject* Update_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         static StackObject* Update_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;

+ 13 - 13
Unity/Assets/Mono/ILRuntime/Generate/ET_TimeInfo_Binding.cs

@@ -23,12 +23,12 @@ namespace ILRuntime.Runtime.Generated
             FieldInfo field;
             FieldInfo field;
             Type[] args;
             Type[] args;
             Type type = typeof(ET.TimeInfo);
             Type type = typeof(ET.TimeInfo);
-            args = new Type[]{typeof(System.Int64)};
-            method = type.GetMethod("set_ServerMinusClientTime", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, set_ServerMinusClientTime_0);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("Update", flag, null, args, null);
             method = type.GetMethod("Update", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Update_1);
+            app.RegisterCLRMethodRedirection(method, Update_0);
+            args = new Type[]{typeof(System.Int64)};
+            method = type.GetMethod("set_ServerMinusClientTime", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, set_ServerMinusClientTime_1);
 
 
             field = type.GetField("Instance", flag);
             field = type.GetField("Instance", flag);
             app.RegisterCLRFieldGetter(field, get_Instance_0);
             app.RegisterCLRFieldGetter(field, get_Instance_0);
@@ -43,35 +43,35 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* set_ServerMinusClientTime_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Update_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Int64 @value = *(long*)&ptr_of_this_method->Value;
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ET.TimeInfo instance_of_this_method = (ET.TimeInfo)typeof(ET.TimeInfo).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.TimeInfo instance_of_this_method = (ET.TimeInfo)typeof(ET.TimeInfo).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.ServerMinusClientTime = value;
+            instance_of_this_method.Update();
 
 
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* Update_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* set_ServerMinusClientTime_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Int64 @value = *(long*)&ptr_of_this_method->Value;
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ET.TimeInfo instance_of_this_method = (ET.TimeInfo)typeof(ET.TimeInfo).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             ET.TimeInfo instance_of_this_method = (ET.TimeInfo)typeof(ET.TimeInfo).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.Update();
+            instance_of_this_method.ServerMinusClientTime = value;
 
 
             return __ret;
             return __ret;
         }
         }

+ 0 - 63
Unity/Assets/Mono/ILRuntime/Generate/ET_UILayerScript_Binding.cs

@@ -1,63 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-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 ET_UILayerScript_Binding
-    {
-        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
-        {
-            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
-            FieldInfo field;
-            Type[] args;
-            Type type = typeof(ET.UILayerScript);
-
-            field = type.GetField("UILayer", flag);
-            app.RegisterCLRFieldGetter(field, get_UILayer_0);
-            app.RegisterCLRFieldSetter(field, set_UILayer_0);
-            app.RegisterCLRFieldBinding(field, CopyToStack_UILayer_0, AssignFromStack_UILayer_0);
-
-
-        }
-
-
-
-        static object get_UILayer_0(ref object o)
-        {
-            return ((ET.UILayerScript)o).UILayer;
-        }
-
-        static StackObject* CopyToStack_UILayer_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
-        {
-            var result_of_this_method = ((ET.UILayerScript)o).UILayer;
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static void set_UILayer_0(ref object o, object v)
-        {
-            ((ET.UILayerScript)o).UILayer = (ET.UILayer)v;
-        }
-
-        static StackObject* AssignFromStack_UILayer_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            ET.UILayer @UILayer = (ET.UILayer)typeof(ET.UILayer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)20);
-            ((ET.UILayerScript)o).UILayer = @UILayer;
-            return ptr_of_this_method;
-        }
-
-
-
-    }
-}

+ 80 - 0
Unity/Assets/Mono/ILRuntime/Generate/LitJson_JsonMapper_Binding.cs

@@ -0,0 +1,80 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+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 LitJson_JsonMapper_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            Type[] args;
+            Type type = typeof(LitJson.JsonMapper);
+            args = new Type[]{typeof(System.Object)};
+            method = type.GetMethod("ToJson", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, ToJson_0);
+            args = new Type[]{typeof(System.Type), typeof(System.String)};
+            method = type.GetMethod("ToObject", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, ToObject_1);
+
+
+        }
+
+
+        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), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+
+            var result_of_this_method = LitJson.JsonMapper.ToJson(@obj);
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+        static StackObject* ToObject_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.String @json = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Type @type = (System.Type)typeof(System.Type).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+
+            var result_of_this_method = LitJson.JsonMapper.ToObject(@type, @json);
+
+            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);
+        }
+
+
+
+    }
+}

+ 11 - 0
Unity/Assets/Mono/ILRuntime/Generate/LitJson_JsonMapper_Binding.cs.meta

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

+ 48 - 48
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_Binding.cs

@@ -22,30 +22,30 @@ namespace ILRuntime.Runtime.Generated
             MethodBase method;
             MethodBase method;
             Type[] args;
             Type[] args;
             Type type = typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>);
             Type type = typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>);
-            args = new Type[]{};
-            method = type.GetMethod("Clear", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Clear_0);
             args = new Type[]{typeof(System.Int32), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
             args = new Type[]{typeof(System.Int32), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
             method = type.GetMethod("Add", flag, null, args, null);
             method = type.GetMethod("Add", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Add_1);
+            app.RegisterCLRMethodRedirection(method, Add_0);
             args = new Type[]{typeof(System.Int32), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).MakeByRefType()};
             args = new Type[]{typeof(System.Int32), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).MakeByRefType()};
             method = type.GetMethod("TryGetValue", flag, null, args, null);
             method = type.GetMethod("TryGetValue", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, TryGetValue_2);
-            args = new Type[]{typeof(System.Int32)};
-            method = type.GetMethod("Remove", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Remove_3);
+            app.RegisterCLRMethodRedirection(method, TryGetValue_1);
             args = new Type[]{typeof(System.Int32)};
             args = new Type[]{typeof(System.Int32)};
             method = type.GetMethod("ContainsKey", flag, null, args, null);
             method = type.GetMethod("ContainsKey", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, ContainsKey_4);
+            app.RegisterCLRMethodRedirection(method, ContainsKey_2);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("get_Count", flag, null, args, null);
             method = type.GetMethod("get_Count", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Count_5);
+            app.RegisterCLRMethodRedirection(method, get_Count_3);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("get_Values", flag, null, args, null);
             method = type.GetMethod("get_Values", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Values_6);
+            app.RegisterCLRMethodRedirection(method, get_Values_4);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("GetEnumerator", flag, null, args, null);
             method = type.GetMethod("GetEnumerator", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetEnumerator_7);
+            app.RegisterCLRMethodRedirection(method, GetEnumerator_5);
+            args = new Type[]{};
+            method = type.GetMethod("Clear", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Clear_6);
+            args = new Type[]{typeof(System.Int32)};
+            method = type.GetMethod("Remove", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Remove_7);
             args = new Type[]{typeof(System.Int32), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
             args = new Type[]{typeof(System.Int32), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
             method = type.GetMethod("set_Item", flag, null, args, null);
             method = type.GetMethod("set_Item", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, set_Item_8);
             app.RegisterCLRMethodRedirection(method, set_Item_8);
@@ -57,22 +57,7 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* Clear_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.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            instance_of_this_method.Clear();
-
-            return __ret;
-        }
-
-        static StackObject* Add_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -94,7 +79,7 @@ namespace ILRuntime.Runtime.Generated
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* TryGetValue_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* TryGetValue_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -175,7 +160,7 @@ namespace ILRuntime.Runtime.Generated
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
-        static StackObject* Remove_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* ContainsKey_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -188,34 +173,31 @@ namespace ILRuntime.Runtime.Generated
             System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.Remove(@key);
+            var result_of_this_method = instance_of_this_method.ContainsKey(@key);
 
 
             __ret->ObjectType = ObjectTypes.Integer;
             __ret->ObjectType = ObjectTypes.Integer;
             __ret->Value = result_of_this_method ? 1 : 0;
             __ret->Value = result_of_this_method ? 1 : 0;
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
-        static StackObject* ContainsKey_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_Count_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Int32 @key = ptr_of_this_method->Value;
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.ContainsKey(@key);
+            var result_of_this_method = instance_of_this_method.Count;
 
 
             __ret->ObjectType = ObjectTypes.Integer;
             __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method ? 1 : 0;
+            __ret->Value = result_of_this_method;
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
-        static StackObject* get_Count_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_Values_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -225,14 +207,12 @@ namespace ILRuntime.Runtime.Generated
             System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.Count;
+            var result_of_this_method = instance_of_this_method.Values;
 
 
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method;
-            return __ret + 1;
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* get_Values_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetEnumerator_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -242,12 +222,12 @@ namespace ILRuntime.Runtime.Generated
             System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.Values;
+            var result_of_this_method = instance_of_this_method.GetEnumerator();
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* GetEnumerator_7(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Clear_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -257,9 +237,29 @@ namespace ILRuntime.Runtime.Generated
             System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.GetEnumerator();
+            instance_of_this_method.Clear();
 
 
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+            return __ret;
+        }
+
+        static StackObject* Remove_7(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.Int32 @key = ptr_of_this_method->Value;
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.Remove(@key);
+
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method ? 1 : 0;
+            return __ret + 1;
         }
         }
 
 
         static StackObject* set_Item_8(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         static StackObject* set_Item_8(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)

+ 0 - 23
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Int32_Int64_Binding.cs

@@ -28,9 +28,6 @@ namespace ILRuntime.Runtime.Generated
             args = new Type[]{typeof(System.Int32), typeof(System.Int64).MakeByRefType()};
             args = new Type[]{typeof(System.Int32), typeof(System.Int64).MakeByRefType()};
             method = type.GetMethod("TryGetValue", flag, null, args, null);
             method = type.GetMethod("TryGetValue", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, TryGetValue_1);
             app.RegisterCLRMethodRedirection(method, TryGetValue_1);
-            args = new Type[]{typeof(System.Int32)};
-            method = type.GetMethod("get_Item", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Item_2);
 
 
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetConstructor(flag, null, args, null);
             method = type.GetConstructor(flag, null, args, null);
@@ -132,26 +129,6 @@ namespace ILRuntime.Runtime.Generated
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
-        static StackObject* get_Item_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.Int32 @key = ptr_of_this_method->Value;
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.Collections.Generic.Dictionary<System.Int32, System.Int64> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, System.Int64>)typeof(System.Collections.Generic.Dictionary<System.Int32, System.Int64>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = instance_of_this_method[key];
-
-            __ret->ObjectType = ObjectTypes.Long;
-            *(long*)&__ret->Value = result_of_this_method;
-            return __ret + 1;
-        }
-
 
 
         static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {

+ 18 - 18
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Int32_Transform_Binding.cs

@@ -22,12 +22,12 @@ namespace ILRuntime.Runtime.Generated
             MethodBase method;
             MethodBase method;
             Type[] args;
             Type[] args;
             Type type = typeof(System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform>);
             Type type = typeof(System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform>);
-            args = new Type[]{typeof(System.Int32), typeof(UnityEngine.Transform)};
-            method = type.GetMethod("Add", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Add_0);
             args = new Type[]{typeof(System.Int32)};
             args = new Type[]{typeof(System.Int32)};
             method = type.GetMethod("get_Item", flag, null, args, null);
             method = type.GetMethod("get_Item", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Item_1);
+            app.RegisterCLRMethodRedirection(method, get_Item_0);
+            args = new Type[]{typeof(System.Int32), typeof(UnityEngine.Transform)};
+            method = type.GetMethod("Add", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Add_1);
 
 
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetConstructor(flag, null, args, null);
             method = type.GetConstructor(flag, null, args, null);
@@ -36,44 +36,44 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_Item_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 3);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            UnityEngine.Transform @value = (UnityEngine.Transform)typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Int32 @key = ptr_of_this_method->Value;
             System.Int32 @key = ptr_of_this_method->Value;
 
 
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform>)typeof(System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform>)typeof(System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.Add(@key, @value);
+            var result_of_this_method = instance_of_this_method[key];
 
 
-            return __ret;
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Add_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 3);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Int32 @key = ptr_of_this_method->Value;
+            UnityEngine.Transform @value = (UnityEngine.Transform)typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Int32 @key = ptr_of_this_method->Value;
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform>)typeof(System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform>)typeof(System.Collections.Generic.Dictionary<System.Int32, UnityEngine.Transform>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method[key];
+            instance_of_this_method.Add(@key, @value);
 
 
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+            return __ret;
         }
         }
 
 
 
 

+ 67 - 67
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_Binding.cs

@@ -22,24 +22,24 @@ namespace ILRuntime.Runtime.Generated
             MethodBase method;
             MethodBase method;
             Type[] args;
             Type[] args;
             Type type = typeof(System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>);
             Type type = typeof(System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>);
-            args = new Type[]{};
-            method = type.GetMethod("get_Values", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Values_0);
-            args = new Type[]{};
-            method = type.GetMethod("Clear", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Clear_1);
-            args = new Type[]{typeof(System.Int64), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
-            method = type.GetMethod("Add", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Add_2);
             args = new Type[]{typeof(System.Int64), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).MakeByRefType()};
             args = new Type[]{typeof(System.Int64), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).MakeByRefType()};
             method = type.GetMethod("TryGetValue", flag, null, args, null);
             method = type.GetMethod("TryGetValue", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, TryGetValue_3);
+            app.RegisterCLRMethodRedirection(method, TryGetValue_0);
+            args = new Type[]{typeof(System.Int64), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
+            method = type.GetMethod("Add", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Add_1);
+            args = new Type[]{};
+            method = type.GetMethod("get_Values", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_Values_2);
             args = new Type[]{typeof(System.Int64)};
             args = new Type[]{typeof(System.Int64)};
             method = type.GetMethod("Remove", flag, null, args, null);
             method = type.GetMethod("Remove", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Remove_4);
+            app.RegisterCLRMethodRedirection(method, Remove_3);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("get_Count", flag, null, args, null);
             method = type.GetMethod("get_Count", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Count_5);
+            app.RegisterCLRMethodRedirection(method, get_Count_4);
+            args = new Type[]{};
+            method = type.GetMethod("Clear", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Clear_5);
             args = new Type[]{typeof(System.Int64)};
             args = new Type[]{typeof(System.Int64)};
             method = type.GetMethod("ContainsKey", flag, null, args, null);
             method = type.GetMethod("ContainsKey", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, ContainsKey_6);
             app.RegisterCLRMethodRedirection(method, ContainsKey_6);
@@ -54,59 +54,7 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* get_Values_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.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = instance_of_this_method.Values;
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* Clear_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            instance_of_this_method.Clear();
-
-            return __ret;
-        }
-
-        static StackObject* Add_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 3);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            ILRuntime.Runtime.Intepreter.ILTypeInstance @value = (ILRuntime.Runtime.Intepreter.ILTypeInstance)typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.Int64 @key = *(long*)&ptr_of_this_method->Value;
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
-            System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            instance_of_this_method.Add(@key, @value);
-
-            return __ret;
-        }
-
-        static StackObject* TryGetValue_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* TryGetValue_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -187,7 +135,44 @@ namespace ILRuntime.Runtime.Generated
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
-        static StackObject* Remove_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Add_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);
+            ILRuntime.Runtime.Intepreter.ILTypeInstance @value = (ILRuntime.Runtime.Intepreter.ILTypeInstance)typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Int64 @key = *(long*)&ptr_of_this_method->Value;
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Add(@key, @value);
+
+            return __ret;
+        }
+
+        static StackObject* get_Values_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.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.Values;
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+        static StackObject* Remove_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -207,7 +192,7 @@ namespace ILRuntime.Runtime.Generated
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
-        static StackObject* get_Count_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_Count_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -224,6 +209,21 @@ namespace ILRuntime.Runtime.Generated
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
+        static StackObject* Clear_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* ptr_of_this_method;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Clear();
+
+            return __ret;
+        }
+
         static StackObject* ContainsKey_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         static StackObject* ContainsKey_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;

+ 146 - 0
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_String_Int64_Binding.cs

@@ -0,0 +1,146 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+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_Collections_Generic_Dictionary_2_String_Int64_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            Type[] args;
+            Type type = typeof(System.Collections.Generic.Dictionary<System.String, System.Int64>);
+            args = new Type[]{typeof(System.String), typeof(System.Int64).MakeByRefType()};
+            method = type.GetMethod("TryGetValue", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, TryGetValue_0);
+            args = new Type[]{typeof(System.String), typeof(System.Int64)};
+            method = type.GetMethod("set_Item", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, set_Item_1);
+
+            args = new Type[]{};
+            method = type.GetConstructor(flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Ctor_0);
+
+        }
+
+
+        static StackObject* TryGetValue_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.Int64 @value = __intp.RetriveInt64(ptr_of_this_method, __mStack);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.String @key = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            System.Collections.Generic.Dictionary<System.String, System.Int64> instance_of_this_method = (System.Collections.Generic.Dictionary<System.String, System.Int64>)typeof(System.Collections.Generic.Dictionary<System.String, System.Int64>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+
+            var result_of_this_method = instance_of_this_method.TryGetValue(@key, out @value);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            switch(ptr_of_this_method->ObjectType)
+            {
+                case ObjectTypes.StackObjectReference:
+                    {
+                        var ___dst = ILIntepreter.ResolveReference(ptr_of_this_method);
+                        ___dst->ObjectType = ObjectTypes.Long;
+                        *(long*)&___dst->Value = @value;
+                    }
+                    break;
+                case ObjectTypes.FieldReference:
+                    {
+                        var ___obj = __mStack[ptr_of_this_method->Value];
+                        if(___obj is ILTypeInstance)
+                        {
+                            ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = @value;
+                        }
+                        else
+                        {
+                            var ___type = __domain.GetType(___obj.GetType()) as CLRType;
+                            ___type.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, @value);
+                        }
+                    }
+                    break;
+                case ObjectTypes.StaticFieldReference:
+                    {
+                        var ___type = __domain.GetType(ptr_of_this_method->Value);
+                        if(___type is ILType)
+                        {
+                            ((ILType)___type).StaticInstance[ptr_of_this_method->ValueLow] = @value;
+                        }
+                        else
+                        {
+                            ((CLRType)___type).SetStaticFieldValue(ptr_of_this_method->ValueLow, @value);
+                        }
+                    }
+                    break;
+                 case ObjectTypes.ArrayReference:
+                    {
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Int64[];
+                        instance_of_arrayReference[ptr_of_this_method->ValueLow] = @value;
+                    }
+                    break;
+            }
+
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            __intp.Free(ptr_of_this_method);
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method ? 1 : 0;
+            return __ret + 1;
+        }
+
+        static StackObject* set_Item_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.Int64 @value = *(long*)&ptr_of_this_method->Value;
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.String @key = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            System.Collections.Generic.Dictionary<System.String, System.Int64> instance_of_this_method = (System.Collections.Generic.Dictionary<System.String, System.Int64>)typeof(System.Collections.Generic.Dictionary<System.String, System.Int64>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method[key] = value;
+
+            return __ret;
+        }
+
+
+        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
+
+            var result_of_this_method = new System.Collections.Generic.Dictionary<System.String, System.Int64>();
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+    }
+}

+ 11 - 0
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_String_Int64_Binding.cs.meta

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

+ 34 - 12
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_List_1_ILTypeInstance_Binding.cs

@@ -22,18 +22,21 @@ namespace ILRuntime.Runtime.Generated
             MethodBase method;
             MethodBase method;
             Type[] args;
             Type[] args;
             Type type = typeof(System.Collections.Generic.List<ILRuntime.Runtime.Intepreter.ILTypeInstance>);
             Type type = typeof(System.Collections.Generic.List<ILRuntime.Runtime.Intepreter.ILTypeInstance>);
-            args = new Type[]{};
-            method = type.GetMethod("GetEnumerator", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetEnumerator_0);
             args = new Type[]{typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
             args = new Type[]{typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
             method = type.GetMethod("Add", flag, null, args, null);
             method = type.GetMethod("Add", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Add_1);
+            app.RegisterCLRMethodRedirection(method, Add_0);
+            args = new Type[]{};
+            method = type.GetMethod("GetEnumerator", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, GetEnumerator_1);
+            args = new Type[]{typeof(System.Collections.Generic.IEnumerable<ILRuntime.Runtime.Intepreter.ILTypeInstance>)};
+            method = type.GetMethod("AddRange", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, AddRange_2);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("Clear", flag, null, args, null);
             method = type.GetMethod("Clear", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Clear_2);
+            app.RegisterCLRMethodRedirection(method, Clear_3);
             args = new Type[]{typeof(System.Int32)};
             args = new Type[]{typeof(System.Int32)};
             method = type.GetMethod("get_Item", flag, null, args, null);
             method = type.GetMethod("get_Item", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Item_3);
+            app.RegisterCLRMethodRedirection(method, get_Item_4);
 
 
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetConstructor(flag, null, args, null);
             method = type.GetConstructor(flag, null, args, null);
@@ -45,7 +48,26 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* GetEnumerator_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        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);
+            ILRuntime.Runtime.Intepreter.ILTypeInstance @item = (ILRuntime.Runtime.Intepreter.ILTypeInstance)typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Collections.Generic.List<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.List<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.List<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Add(@item);
+
+            return __ret;
+        }
+
+        static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -60,26 +82,26 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* Add_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* AddRange_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
             StackObject* __ret = ILIntepreter.Minus(__esp, 2);
             StackObject* __ret = ILIntepreter.Minus(__esp, 2);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            ILRuntime.Runtime.Intepreter.ILTypeInstance @item = (ILRuntime.Runtime.Intepreter.ILTypeInstance)typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.Collections.Generic.IEnumerable<ILRuntime.Runtime.Intepreter.ILTypeInstance> @collection = (System.Collections.Generic.IEnumerable<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.IEnumerable<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Collections.Generic.List<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.List<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.List<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.List<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.List<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.List<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.Add(@item);
+            instance_of_this_method.AddRange(@collection);
 
 
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* Clear_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Clear_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -94,7 +116,7 @@ namespace ILRuntime.Runtime.Generated
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* get_Item_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_Item_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;

+ 17 - 17
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_List_1_Int64_Binding.cs

@@ -22,12 +22,12 @@ namespace ILRuntime.Runtime.Generated
             MethodBase method;
             MethodBase method;
             Type[] args;
             Type[] args;
             Type type = typeof(System.Collections.Generic.List<System.Int64>);
             Type type = typeof(System.Collections.Generic.List<System.Int64>);
-            args = new Type[]{typeof(System.Int32)};
-            method = type.GetMethod("get_Item", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Item_0);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("GetEnumerator", flag, null, args, null);
             method = type.GetMethod("GetEnumerator", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetEnumerator_1);
+            app.RegisterCLRMethodRedirection(method, GetEnumerator_0);
+            args = new Type[]{typeof(System.Int32)};
+            method = type.GetMethod("get_Item", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_Item_1);
 
 
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetConstructor(flag, null, args, null);
             method = type.GetConstructor(flag, null, args, null);
@@ -36,39 +36,39 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* get_Item_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetEnumerator_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Int32 @index = ptr_of_this_method->Value;
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Collections.Generic.List<System.Int64> instance_of_this_method = (System.Collections.Generic.List<System.Int64>)typeof(System.Collections.Generic.List<System.Int64>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.List<System.Int64> instance_of_this_method = (System.Collections.Generic.List<System.Int64>)typeof(System.Collections.Generic.List<System.Int64>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method[index];
+            var result_of_this_method = instance_of_this_method.GetEnumerator();
 
 
-            __ret->ObjectType = ObjectTypes.Long;
-            *(long*)&__ret->Value = result_of_this_method;
-            return __ret + 1;
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Int32 @index = ptr_of_this_method->Value;
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Collections.Generic.List<System.Int64> instance_of_this_method = (System.Collections.Generic.List<System.Int64>)typeof(System.Collections.Generic.List<System.Int64>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.List<System.Int64> instance_of_this_method = (System.Collections.Generic.List<System.Int64>)typeof(System.Collections.Generic.List<System.Int64>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.GetEnumerator();
+            var result_of_this_method = instance_of_this_method[index];
 
 
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+            __ret->ObjectType = ObjectTypes.Long;
+            *(long*)&__ret->Value = result_of_this_method;
+            return __ret + 1;
         }
         }
 
 
 
 

+ 53 - 28
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_List_1_Vector3_Binding.cs

@@ -22,21 +22,24 @@ namespace ILRuntime.Runtime.Generated
             MethodBase method;
             MethodBase method;
             Type[] args;
             Type[] args;
             Type type = typeof(System.Collections.Generic.List<UnityEngine.Vector3>);
             Type type = typeof(System.Collections.Generic.List<UnityEngine.Vector3>);
-            args = new Type[]{typeof(UnityEngine.Vector3)};
-            method = type.GetMethod("Add", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Add_0);
-            args = new Type[]{};
-            method = type.GetMethod("Clear", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Clear_1);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("get_Count", flag, null, args, null);
             method = type.GetMethod("get_Count", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Count_2);
+            app.RegisterCLRMethodRedirection(method, get_Count_0);
+            args = new Type[]{typeof(UnityEngine.Vector3)};
+            method = type.GetMethod("Add", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Add_1);
             args = new Type[]{typeof(System.Int32)};
             args = new Type[]{typeof(System.Int32)};
             method = type.GetMethod("get_Item", flag, null, args, null);
             method = type.GetMethod("get_Item", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Item_3);
+            app.RegisterCLRMethodRedirection(method, get_Item_2);
+            args = new Type[]{};
+            method = type.GetMethod("Clear", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Clear_3);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("GetEnumerator", flag, null, args, null);
             method = type.GetMethod("GetEnumerator", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, GetEnumerator_4);
             app.RegisterCLRMethodRedirection(method, GetEnumerator_4);
+            args = new Type[]{typeof(System.Int32), typeof(UnityEngine.Vector3)};
+            method = type.GetMethod("set_Item", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, set_Item_5);
 
 
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetConstructor(flag, null, args, null);
             method = type.GetConstructor(flag, null, args, null);
@@ -45,7 +48,24 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_Count_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.Collections.Generic.List<UnityEngine.Vector3> instance_of_this_method = (System.Collections.Generic.List<UnityEngine.Vector3>)typeof(System.Collections.Generic.List<UnityEngine.Vector3>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.Count;
+
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+        static StackObject* Add_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -64,22 +84,25 @@ namespace ILRuntime.Runtime.Generated
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* Clear_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_Item_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Int32 @index = ptr_of_this_method->Value;
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Collections.Generic.List<UnityEngine.Vector3> instance_of_this_method = (System.Collections.Generic.List<UnityEngine.Vector3>)typeof(System.Collections.Generic.List<UnityEngine.Vector3>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.List<UnityEngine.Vector3> instance_of_this_method = (System.Collections.Generic.List<UnityEngine.Vector3>)typeof(System.Collections.Generic.List<UnityEngine.Vector3>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.Clear();
+            var result_of_this_method = instance_of_this_method[index];
 
 
-            return __ret;
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* get_Count_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Clear_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -89,44 +112,46 @@ namespace ILRuntime.Runtime.Generated
             System.Collections.Generic.List<UnityEngine.Vector3> instance_of_this_method = (System.Collections.Generic.List<UnityEngine.Vector3>)typeof(System.Collections.Generic.List<UnityEngine.Vector3>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.List<UnityEngine.Vector3> instance_of_this_method = (System.Collections.Generic.List<UnityEngine.Vector3>)typeof(System.Collections.Generic.List<UnityEngine.Vector3>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.Count;
+            instance_of_this_method.Clear();
 
 
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method;
-            return __ret + 1;
+            return __ret;
         }
         }
 
 
-        static StackObject* get_Item_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetEnumerator_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Int32 @index = ptr_of_this_method->Value;
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Collections.Generic.List<UnityEngine.Vector3> instance_of_this_method = (System.Collections.Generic.List<UnityEngine.Vector3>)typeof(System.Collections.Generic.List<UnityEngine.Vector3>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.List<UnityEngine.Vector3> instance_of_this_method = (System.Collections.Generic.List<UnityEngine.Vector3>)typeof(System.Collections.Generic.List<UnityEngine.Vector3>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method[index];
+            var result_of_this_method = instance_of_this_method.GetEnumerator();
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* GetEnumerator_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* set_Item_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 3);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            UnityEngine.Vector3 @value = (UnityEngine.Vector3)typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
+            __intp.Free(ptr_of_this_method);
+
+            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.Collections.Generic.List<UnityEngine.Vector3> instance_of_this_method = (System.Collections.Generic.List<UnityEngine.Vector3>)typeof(System.Collections.Generic.List<UnityEngine.Vector3>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Collections.Generic.List<UnityEngine.Vector3> instance_of_this_method = (System.Collections.Generic.List<UnityEngine.Vector3>)typeof(System.Collections.Generic.List<UnityEngine.Vector3>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.GetEnumerator();
+            instance_of_this_method[index] = value;
 
 
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+            return __ret;
         }
         }
 
 
 
 

+ 10 - 10
Unity/Assets/Mono/ILRuntime/Generate/ET_ComponentView_Binding.cs → Unity/Assets/Mono/ILRuntime/Generate/System_Func_2_String_Byte_Array_Binding.cs

@@ -14,39 +14,39 @@ using ILRuntime.CLR.Utils;
 
 
 namespace ILRuntime.Runtime.Generated
 namespace ILRuntime.Runtime.Generated
 {
 {
-    unsafe class ET_ComponentView_Binding
+    unsafe class System_Func_2_String_Byte_Array_Binding
     {
     {
         public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
         public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
         {
         {
             BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
             BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
             MethodBase method;
             MethodBase method;
             Type[] args;
             Type[] args;
-            Type type = typeof(ET.ComponentView);
-            args = new Type[]{typeof(System.Object)};
-            method = type.GetMethod("set_Component", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, set_Component_0);
+            Type type = typeof(System.Func<System.String, System.Byte[]>);
+            args = new Type[]{typeof(System.String)};
+            method = type.GetMethod("Invoke", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Invoke_0);
 
 
 
 
         }
         }
 
 
 
 
-        static StackObject* set_Component_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
             StackObject* __ret = ILIntepreter.Minus(__esp, 2);
             StackObject* __ret = ILIntepreter.Minus(__esp, 2);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Object @value = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.String @arg = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            ET.ComponentView instance_of_this_method = (ET.ComponentView)typeof(ET.ComponentView).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.Func<System.String, System.Byte[]> instance_of_this_method = (System.Func<System.String, System.Byte[]>)typeof(System.Func<System.String, System.Byte[]>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.Component = value;
+            var result_of_this_method = instance_of_this_method.Invoke(@arg);
 
 
-            return __ret;
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
 
 

+ 11 - 0
Unity/Assets/Mono/ILRuntime/Generate/System_Func_2_String_Byte_Array_Binding.cs.meta

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

+ 8 - 8
Unity/Assets/Mono/ILRuntime/Generate/System_IO_MemoryStream_Binding.cs

@@ -23,11 +23,11 @@ namespace ILRuntime.Runtime.Generated
             Type[] args;
             Type[] args;
             Type type = typeof(System.IO.MemoryStream);
             Type type = typeof(System.IO.MemoryStream);
             args = new Type[]{};
             args = new Type[]{};
-            method = type.GetMethod("GetBuffer", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetBuffer_0);
-            args = new Type[]{};
             method = type.GetMethod("ToArray", flag, null, args, null);
             method = type.GetMethod("ToArray", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, ToArray_1);
+            app.RegisterCLRMethodRedirection(method, ToArray_0);
+            args = new Type[]{};
+            method = type.GetMethod("GetBuffer", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, GetBuffer_1);
 
 
             args = new Type[]{typeof(System.Byte[]), typeof(System.Int32), typeof(System.Int32)};
             args = new Type[]{typeof(System.Byte[]), typeof(System.Int32), typeof(System.Int32)};
             method = type.GetConstructor(flag, null, args, null);
             method = type.GetConstructor(flag, null, args, null);
@@ -42,7 +42,7 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* GetBuffer_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* ToArray_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -52,12 +52,12 @@ namespace ILRuntime.Runtime.Generated
             System.IO.MemoryStream instance_of_this_method = (System.IO.MemoryStream)typeof(System.IO.MemoryStream).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.IO.MemoryStream instance_of_this_method = (System.IO.MemoryStream)typeof(System.IO.MemoryStream).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.GetBuffer();
+            var result_of_this_method = instance_of_this_method.ToArray();
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* ToArray_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetBuffer_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -67,7 +67,7 @@ namespace ILRuntime.Runtime.Generated
             System.IO.MemoryStream instance_of_this_method = (System.IO.MemoryStream)typeof(System.IO.MemoryStream).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.IO.MemoryStream instance_of_this_method = (System.IO.MemoryStream)typeof(System.IO.MemoryStream).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.ToArray();
+            var result_of_this_method = instance_of_this_method.GetBuffer();
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }

+ 24 - 24
Unity/Assets/Mono/ILRuntime/Generate/System_Linq_Enumerable_Binding.cs

@@ -35,40 +35,40 @@ namespace ILRuntime.Runtime.Generated
                     lst.Add(m);
                     lst.Add(m);
                 }
                 }
             }
             }
-            args = new Type[]{typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
-            if (genericMethods.TryGetValue("ToArray", out lst))
+            args = new Type[]{typeof(System.Collections.Generic.KeyValuePair<System.Type, System.Int32>), typeof(System.Int32)};
+            if (genericMethods.TryGetValue("OrderByDescending", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance[]), typeof(System.Collections.Generic.IEnumerable<ILRuntime.Runtime.Intepreter.ILTypeInstance>)))
+                    if(m.MatchGenericParameters(args, typeof(System.Linq.IOrderedEnumerable<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>>), typeof(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>>), typeof(System.Func<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>, System.Int32>)))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
-                        app.RegisterCLRMethodRedirection(method, ToArray_0);
+                        app.RegisterCLRMethodRedirection(method, OrderByDescending_0);
 
 
                         break;
                         break;
                     }
                     }
                 }
                 }
             }
             }
-            args = new Type[]{typeof(System.Collections.Generic.KeyValuePair<System.Type, System.Int32>), typeof(System.Int32)};
-            if (genericMethods.TryGetValue("OrderByDescending", out lst))
+            args = new Type[]{typeof(System.Object)};
+            if (genericMethods.TryGetValue("ToArray", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(System.Linq.IOrderedEnumerable<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>>), typeof(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>>), typeof(System.Func<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>, System.Int32>)))
+                    if(m.MatchGenericParameters(args, typeof(System.Object[]), typeof(System.Collections.Generic.IEnumerable<System.Object>)))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
-                        app.RegisterCLRMethodRedirection(method, OrderByDescending_1);
+                        app.RegisterCLRMethodRedirection(method, ToArray_1);
 
 
                         break;
                         break;
                     }
                     }
                 }
                 }
             }
             }
-            args = new Type[]{typeof(System.Object)};
+            args = new Type[]{typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
             if (genericMethods.TryGetValue("ToArray", out lst))
             if (genericMethods.TryGetValue("ToArray", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(System.Object[]), typeof(System.Collections.Generic.IEnumerable<System.Object>)))
+                    if(m.MatchGenericParameters(args, typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance[]), typeof(System.Collections.Generic.IEnumerable<ILRuntime.Runtime.Intepreter.ILTypeInstance>)))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, ToArray_2);
                         app.RegisterCLRMethodRedirection(method, ToArray_2);
@@ -124,38 +124,38 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* ToArray_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* OrderByDescending_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.IEnumerable<ILRuntime.Runtime.Intepreter.ILTypeInstance> @source = (System.Collections.Generic.IEnumerable<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.IEnumerable<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.Func<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>, System.Int32> @keySelector = (System.Func<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>, System.Int32>)typeof(System.Func<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>, System.Int32>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>> @source = (System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>>)typeof(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = System.Linq.Enumerable.ToArray<ILRuntime.Runtime.Intepreter.ILTypeInstance>(@source);
+
+            var result_of_this_method = System.Linq.Enumerable.OrderByDescending<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>, System.Int32>(@source, @keySelector);
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* OrderByDescending_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* ToArray_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Func<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>, System.Int32> @keySelector = (System.Func<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>, System.Int32>)typeof(System.Func<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>, System.Int32>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
-            __intp.Free(ptr_of_this_method);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>> @source = (System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>>)typeof(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.Collections.Generic.IEnumerable<System.Object> @source = (System.Collections.Generic.IEnumerable<System.Object>)typeof(System.Collections.Generic.IEnumerable<System.Object>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
 
 
-            var result_of_this_method = System.Linq.Enumerable.OrderByDescending<System.Collections.Generic.KeyValuePair<System.Type, System.Int32>, System.Int32>(@source, @keySelector);
+            var result_of_this_method = System.Linq.Enumerable.ToArray<System.Object>(@source);
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
@@ -167,11 +167,11 @@ namespace ILRuntime.Runtime.Generated
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.IEnumerable<System.Object> @source = (System.Collections.Generic.IEnumerable<System.Object>)typeof(System.Collections.Generic.IEnumerable<System.Object>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.Collections.Generic.IEnumerable<ILRuntime.Runtime.Intepreter.ILTypeInstance> @source = (System.Collections.Generic.IEnumerable<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.IEnumerable<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
 
 
-            var result_of_this_method = System.Linq.Enumerable.ToArray<System.Object>(@source);
+            var result_of_this_method = System.Linq.Enumerable.ToArray<ILRuntime.Runtime.Intepreter.ILTypeInstance>(@source);
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }

+ 15 - 15
Unity/Assets/Mono/ILRuntime/Generate/System_Object_Binding.cs

@@ -23,14 +23,14 @@ namespace ILRuntime.Runtime.Generated
             Type[] args;
             Type[] args;
             Type type = typeof(System.Object);
             Type type = typeof(System.Object);
             args = new Type[]{};
             args = new Type[]{};
+            method = type.GetMethod("GetHashCode", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, GetHashCode_0);
+            args = new Type[]{};
             method = type.GetMethod("ToString", flag, null, args, null);
             method = type.GetMethod("ToString", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, ToString_0);
+            app.RegisterCLRMethodRedirection(method, ToString_1);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("GetType", flag, null, args, null);
             method = type.GetMethod("GetType", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetType_1);
-            args = new Type[]{};
-            method = type.GetMethod("GetHashCode", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetHashCode_2);
+            app.RegisterCLRMethodRedirection(method, GetType_2);
 
 
             app.RegisterCLRCreateArrayInstance(type, s => new System.Object[s]);
             app.RegisterCLRCreateArrayInstance(type, s => new System.Object[s]);
 
 
@@ -38,7 +38,7 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetHashCode_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -48,12 +48,14 @@ namespace ILRuntime.Runtime.Generated
             System.Object instance_of_this_method = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Object instance_of_this_method = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.ToString();
+            var result_of_this_method = instance_of_this_method.GetHashCode();
 
 
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method;
+            return __ret + 1;
         }
         }
 
 
-        static StackObject* GetType_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* ToString_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -63,12 +65,12 @@ namespace ILRuntime.Runtime.Generated
             System.Object instance_of_this_method = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Object instance_of_this_method = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.GetType();
+            var result_of_this_method = instance_of_this_method.ToString();
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* GetHashCode_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetType_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -78,11 +80,9 @@ namespace ILRuntime.Runtime.Generated
             System.Object instance_of_this_method = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             System.Object instance_of_this_method = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.GetHashCode();
+            var result_of_this_method = instance_of_this_method.GetType();
 
 
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method;
-            return __ret + 1;
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
 
 

+ 77 - 0
Unity/Assets/Mono/ILRuntime/Generate/System_Single_Binding.cs

@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+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_Single_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            Type type = typeof(System.Single);
+
+            app.RegisterCLRCreateArrayInstance(type, s => new System.Single[s]);
+
+
+        }
+
+        static System.Single GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList<object> __mStack)
+        {
+            ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
+            System.Single instance_of_this_method;
+            switch(ptr_of_this_method->ObjectType)
+            {
+                case ObjectTypes.FieldReference:
+                    {
+                        var instance_of_fieldReference = __mStack[ptr_of_this_method->Value];
+                        if(instance_of_fieldReference is ILTypeInstance)
+                        {
+                            instance_of_this_method = (System.Single)typeof(System.Single).CheckCLRTypes(((ILTypeInstance)instance_of_fieldReference)[ptr_of_this_method->ValueLow]);
+                        }
+                        else
+                        {
+                            var t = __domain.GetType(instance_of_fieldReference.GetType()) as CLRType;
+                            instance_of_this_method = (System.Single)t.GetFieldValue(ptr_of_this_method->ValueLow, instance_of_fieldReference);
+                        }
+                    }
+                    break;
+                case ObjectTypes.StaticFieldReference:
+                    {
+                        var t = __domain.GetType(ptr_of_this_method->Value);
+                        if(t is ILType)
+                        {
+                            instance_of_this_method = (System.Single)typeof(System.Single).CheckCLRTypes(((ILType)t).StaticInstance[ptr_of_this_method->ValueLow]);
+                        }
+                        else
+                        {
+                            instance_of_this_method = (System.Single)((CLRType)t).GetFieldValue(ptr_of_this_method->ValueLow, null);
+                        }
+                    }
+                    break;
+                case ObjectTypes.ArrayReference:
+                    {
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Single[];
+                        instance_of_this_method = instance_of_arrayReference[ptr_of_this_method->ValueLow];                        
+                    }
+                    break;
+                default:
+                    instance_of_this_method = *(float*)&ptr_of_this_method->Value;
+                    break;
+            }
+            return instance_of_this_method;
+        }
+
+
+
+    }
+}

+ 11 - 0
Unity/Assets/Mono/ILRuntime/Generate/System_Single_Binding.cs.meta

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

+ 62 - 45
Unity/Assets/Mono/ILRuntime/Generate/System_String_Binding.cs

@@ -20,29 +20,30 @@ namespace ILRuntime.Runtime.Generated
         {
         {
             BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
             BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
             MethodBase method;
             MethodBase method;
+            FieldInfo field;
             Type[] args;
             Type[] args;
             Type type = typeof(System.String);
             Type type = typeof(System.String);
-            args = new Type[]{typeof(System.String), typeof(System.Object)};
-            method = type.GetMethod("Format", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Format_0);
             args = new Type[]{typeof(System.String), typeof(System.Object), typeof(System.Object)};
             args = new Type[]{typeof(System.String), typeof(System.Object), typeof(System.Object)};
             method = type.GetMethod("Format", flag, null, args, null);
             method = type.GetMethod("Format", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Format_1);
+            app.RegisterCLRMethodRedirection(method, Format_0);
             args = new Type[]{typeof(System.String), typeof(System.String)};
             args = new Type[]{typeof(System.String), typeof(System.String)};
             method = type.GetMethod("Concat", flag, null, args, null);
             method = type.GetMethod("Concat", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Concat_2);
+            app.RegisterCLRMethodRedirection(method, Concat_1);
             args = new Type[]{typeof(System.String), typeof(System.String), typeof(System.String)};
             args = new Type[]{typeof(System.String), typeof(System.String), typeof(System.String)};
             method = type.GetMethod("Concat", flag, null, args, null);
             method = type.GetMethod("Concat", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Concat_3);
+            app.RegisterCLRMethodRedirection(method, Concat_2);
             args = new Type[]{typeof(System.String), typeof(System.Object[])};
             args = new Type[]{typeof(System.String), typeof(System.Object[])};
             method = type.GetMethod("Format", flag, null, args, null);
             method = type.GetMethod("Format", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Format_3);
+            args = new Type[]{typeof(System.String), typeof(System.Object), typeof(System.Object), typeof(System.Object)};
+            method = type.GetMethod("Format", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, Format_4);
             app.RegisterCLRMethodRedirection(method, Format_4);
+            args = new Type[]{typeof(System.String), typeof(System.Object)};
+            method = type.GetMethod("Format", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Format_5);
             args = new Type[]{typeof(System.String), typeof(System.String), typeof(System.String), typeof(System.String)};
             args = new Type[]{typeof(System.String), typeof(System.String), typeof(System.String), typeof(System.String)};
             method = type.GetMethod("Concat", flag, null, args, null);
             method = type.GetMethod("Concat", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Concat_5);
-            args = new Type[]{typeof(System.String), typeof(System.Object), typeof(System.Object), typeof(System.Object)};
-            method = type.GetMethod("Format", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Format_6);
+            app.RegisterCLRMethodRedirection(method, Concat_6);
             args = new Type[]{typeof(System.String)};
             args = new Type[]{typeof(System.String)};
             method = type.GetMethod("IsNullOrEmpty", flag, null, args, null);
             method = type.GetMethod("IsNullOrEmpty", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, IsNullOrEmpty_7);
             app.RegisterCLRMethodRedirection(method, IsNullOrEmpty_7);
@@ -59,6 +60,10 @@ namespace ILRuntime.Runtime.Generated
             method = type.GetMethod("ToLower", flag, null, args, null);
             method = type.GetMethod("ToLower", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, ToLower_11);
             app.RegisterCLRMethodRedirection(method, ToLower_11);
 
 
+            field = type.GetField("Empty", flag);
+            app.RegisterCLRFieldGetter(field, get_Empty_0);
+            app.RegisterCLRFieldBinding(field, CopyToStack_Empty_0, null);
+
             app.RegisterCLRCreateArrayInstance(type, s => new System.String[s]);
             app.RegisterCLRCreateArrayInstance(type, s => new System.String[s]);
 
 
 
 
@@ -66,26 +71,6 @@ namespace ILRuntime.Runtime.Generated
 
 
 
 
         static StackObject* Format_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         static StackObject* Format_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.Object @arg0 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.String @format = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-
-            var result_of_this_method = System.String.Format(@format, @arg0);
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* Format_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -109,7 +94,7 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* Concat_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Concat_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -129,7 +114,7 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* Concat_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Concat_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -153,7 +138,7 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* Format_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Format_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -173,58 +158,78 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* Concat_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Format_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
             StackObject* __ret = ILIntepreter.Minus(__esp, 4);
             StackObject* __ret = ILIntepreter.Minus(__esp, 4);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.String @str3 = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.Object @arg2 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.String @str2 = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.Object @arg1 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
-            System.String @str1 = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.Object @arg0 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
-            System.String @str0 = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.String @format = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
 
 
-            var result_of_this_method = System.String.Concat(@str0, @str1, @str2, @str3);
+            var result_of_this_method = System.String.Format(@format, @arg0, @arg1, @arg2);
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* Format_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Format_5(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.Object @arg0 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.String @format = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+
+            var result_of_this_method = System.String.Format(@format, @arg0);
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+        static StackObject* Concat_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
             StackObject* __ret = ILIntepreter.Minus(__esp, 4);
             StackObject* __ret = ILIntepreter.Minus(__esp, 4);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Object @arg2 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.String @str3 = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.Object @arg1 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.String @str2 = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
-            System.Object @arg0 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.String @str1 = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
-            System.String @format = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.String @str0 = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
 
 
-            var result_of_this_method = System.String.Format(@format, @arg0, @arg1, @arg2);
+            var result_of_this_method = System.String.Concat(@str0, @str1, @str2, @str3);
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
@@ -324,6 +329,18 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
+        static object get_Empty_0(ref object o)
+        {
+            return System.String.Empty;
+        }
+
+        static StackObject* CopyToStack_Empty_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
+        {
+            var result_of_this_method = System.String.Empty;
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
 
 
     }
     }
 }
 }

+ 12 - 12
Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_AsyncOperation_Binding.cs

@@ -23,11 +23,11 @@ namespace ILRuntime.Runtime.Generated
             Type[] args;
             Type[] args;
             Type type = typeof(UnityEngine.AsyncOperation);
             Type type = typeof(UnityEngine.AsyncOperation);
             args = new Type[]{};
             args = new Type[]{};
-            method = type.GetMethod("get_isDone", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_isDone_0);
-            args = new Type[]{};
             method = type.GetMethod("get_progress", flag, null, args, null);
             method = type.GetMethod("get_progress", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_progress_1);
+            app.RegisterCLRMethodRedirection(method, get_progress_0);
+            args = new Type[]{};
+            method = type.GetMethod("get_isDone", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_isDone_1);
             args = new Type[]{typeof(System.Action<UnityEngine.AsyncOperation>)};
             args = new Type[]{typeof(System.Action<UnityEngine.AsyncOperation>)};
             method = type.GetMethod("add_completed", flag, null, args, null);
             method = type.GetMethod("add_completed", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, add_completed_2);
             app.RegisterCLRMethodRedirection(method, add_completed_2);
@@ -36,7 +36,7 @@ namespace ILRuntime.Runtime.Generated
         }
         }
 
 
 
 
-        static StackObject* get_isDone_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_progress_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -46,14 +46,14 @@ namespace ILRuntime.Runtime.Generated
             UnityEngine.AsyncOperation instance_of_this_method = (UnityEngine.AsyncOperation)typeof(UnityEngine.AsyncOperation).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             UnityEngine.AsyncOperation instance_of_this_method = (UnityEngine.AsyncOperation)typeof(UnityEngine.AsyncOperation).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.isDone;
+            var result_of_this_method = instance_of_this_method.progress;
 
 
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method ? 1 : 0;
+            __ret->ObjectType = ObjectTypes.Float;
+            *(float*)&__ret->Value = result_of_this_method;
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
-        static StackObject* get_progress_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_isDone_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -63,10 +63,10 @@ namespace ILRuntime.Runtime.Generated
             UnityEngine.AsyncOperation instance_of_this_method = (UnityEngine.AsyncOperation)typeof(UnityEngine.AsyncOperation).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             UnityEngine.AsyncOperation instance_of_this_method = (UnityEngine.AsyncOperation)typeof(UnityEngine.AsyncOperation).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.progress;
+            var result_of_this_method = instance_of_this_method.isDone;
 
 
-            __ret->ObjectType = ObjectTypes.Float;
-            *(float*)&__ret->Value = result_of_this_method;
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method ? 1 : 0;
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 

+ 12 - 70
Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_GameObject_Binding.cs

@@ -59,12 +59,12 @@ namespace ILRuntime.Runtime.Generated
             args = new Type[]{typeof(System.Int32)};
             args = new Type[]{typeof(System.Int32)};
             method = type.GetMethod("set_layer", flag, null, args, null);
             method = type.GetMethod("set_layer", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, set_layer_3);
             app.RegisterCLRMethodRedirection(method, set_layer_3);
-            args = new Type[]{typeof(global::ReferenceCollector)};
+            args = new Type[]{typeof(UnityEngine.Animator)};
             if (genericMethods.TryGetValue("GetComponent", out lst))
             if (genericMethods.TryGetValue("GetComponent", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(global::ReferenceCollector)))
+                    if(m.MatchGenericParameters(args, typeof(UnityEngine.Animator)))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, GetComponent_4);
                         app.RegisterCLRMethodRedirection(method, GetComponent_4);
@@ -73,12 +73,12 @@ namespace ILRuntime.Runtime.Generated
                     }
                     }
                 }
                 }
             }
             }
-            args = new Type[]{typeof(UnityEngine.UI.Button)};
+            args = new Type[]{typeof(global::ReferenceCollector)};
             if (genericMethods.TryGetValue("GetComponent", out lst))
             if (genericMethods.TryGetValue("GetComponent", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(UnityEngine.UI.Button)))
+                    if(m.MatchGenericParameters(args, typeof(global::ReferenceCollector)))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, GetComponent_5);
                         app.RegisterCLRMethodRedirection(method, GetComponent_5);
@@ -87,12 +87,12 @@ namespace ILRuntime.Runtime.Generated
                     }
                     }
                 }
                 }
             }
             }
-            args = new Type[]{typeof(UnityEngine.UI.InputField)};
+            args = new Type[]{typeof(UnityEngine.UI.Button)};
             if (genericMethods.TryGetValue("GetComponent", out lst))
             if (genericMethods.TryGetValue("GetComponent", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(UnityEngine.UI.InputField)))
+                    if(m.MatchGenericParameters(args, typeof(UnityEngine.UI.Button)))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, GetComponent_6);
                         app.RegisterCLRMethodRedirection(method, GetComponent_6);
@@ -101,12 +101,12 @@ namespace ILRuntime.Runtime.Generated
                     }
                     }
                 }
                 }
             }
             }
-            args = new Type[]{typeof(UnityEngine.Animator)};
+            args = new Type[]{typeof(UnityEngine.UI.InputField)};
             if (genericMethods.TryGetValue("GetComponent", out lst))
             if (genericMethods.TryGetValue("GetComponent", out lst))
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(UnityEngine.Animator)))
+                    if(m.MatchGenericParameters(args, typeof(UnityEngine.UI.InputField)))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, GetComponent_7);
                         app.RegisterCLRMethodRedirection(method, GetComponent_7);
@@ -115,34 +115,6 @@ namespace ILRuntime.Runtime.Generated
                     }
                     }
                 }
                 }
             }
             }
-            args = new Type[]{typeof(ET.UILayerScript)};
-            if (genericMethods.TryGetValue("GetComponent", out lst))
-            {
-                foreach(var m in lst)
-                {
-                    if(m.MatchGenericParameters(args, typeof(ET.UILayerScript)))
-                    {
-                        method = m.MakeGenericMethod(args);
-                        app.RegisterCLRMethodRedirection(method, GetComponent_8);
-
-                        break;
-                    }
-                }
-            }
-            args = new Type[]{typeof(ET.ComponentView)};
-            if (genericMethods.TryGetValue("AddComponent", out lst))
-            {
-                foreach(var m in lst)
-                {
-                    if(m.MatchGenericParameters(args, typeof(ET.ComponentView)))
-                    {
-                        method = m.MakeGenericMethod(args);
-                        app.RegisterCLRMethodRedirection(method, AddComponent_9);
-
-                        break;
-                    }
-                }
-            }
 
 
 
 
         }
         }
@@ -222,7 +194,7 @@ namespace ILRuntime.Runtime.Generated
             UnityEngine.GameObject instance_of_this_method = (UnityEngine.GameObject)typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             UnityEngine.GameObject instance_of_this_method = (UnityEngine.GameObject)typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.GetComponent<global::ReferenceCollector>();
+            var result_of_this_method = instance_of_this_method.GetComponent<UnityEngine.Animator>();
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
@@ -237,7 +209,7 @@ namespace ILRuntime.Runtime.Generated
             UnityEngine.GameObject instance_of_this_method = (UnityEngine.GameObject)typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             UnityEngine.GameObject instance_of_this_method = (UnityEngine.GameObject)typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.GetComponent<UnityEngine.UI.Button>();
+            var result_of_this_method = instance_of_this_method.GetComponent<global::ReferenceCollector>();
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
@@ -252,7 +224,7 @@ namespace ILRuntime.Runtime.Generated
             UnityEngine.GameObject instance_of_this_method = (UnityEngine.GameObject)typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             UnityEngine.GameObject instance_of_this_method = (UnityEngine.GameObject)typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.GetComponent<UnityEngine.UI.InputField>();
+            var result_of_this_method = instance_of_this_method.GetComponent<UnityEngine.UI.Button>();
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
@@ -267,37 +239,7 @@ namespace ILRuntime.Runtime.Generated
             UnityEngine.GameObject instance_of_this_method = (UnityEngine.GameObject)typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             UnityEngine.GameObject instance_of_this_method = (UnityEngine.GameObject)typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            var result_of_this_method = instance_of_this_method.GetComponent<UnityEngine.Animator>();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* GetComponent_8(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);
-            UnityEngine.GameObject instance_of_this_method = (UnityEngine.GameObject)typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = instance_of_this_method.GetComponent<ET.UILayerScript>();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* AddComponent_9(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);
-            UnityEngine.GameObject instance_of_this_method = (UnityEngine.GameObject)typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = instance_of_this_method.AddComponent<ET.ComponentView>();
+            var result_of_this_method = instance_of_this_method.GetComponent<UnityEngine.UI.InputField>();
 
 
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }

+ 19 - 19
Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_LayerMask_Binding.cs

@@ -22,15 +22,15 @@ namespace ILRuntime.Runtime.Generated
             MethodBase method;
             MethodBase method;
             Type[] args;
             Type[] args;
             Type type = typeof(UnityEngine.LayerMask);
             Type type = typeof(UnityEngine.LayerMask);
-            args = new Type[]{typeof(System.String[])};
-            method = type.GetMethod("GetMask", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetMask_0);
             args = new Type[]{typeof(System.String)};
             args = new Type[]{typeof(System.String)};
             method = type.GetMethod("NameToLayer", flag, null, args, null);
             method = type.GetMethod("NameToLayer", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, NameToLayer_1);
+            app.RegisterCLRMethodRedirection(method, NameToLayer_0);
             args = new Type[]{typeof(System.Int32)};
             args = new Type[]{typeof(System.Int32)};
             method = type.GetMethod("LayerToName", flag, null, args, null);
             method = type.GetMethod("LayerToName", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, LayerToName_2);
+            app.RegisterCLRMethodRedirection(method, LayerToName_1);
+            args = new Type[]{typeof(System.String[])};
+            method = type.GetMethod("GetMask", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, GetMask_2);
 
 
             app.RegisterCLRCreateDefaultInstance(type, () => new UnityEngine.LayerMask());
             app.RegisterCLRCreateDefaultInstance(type, () => new UnityEngine.LayerMask());
 
 
@@ -83,55 +83,55 @@ namespace ILRuntime.Runtime.Generated
             }
             }
         }
         }
 
 
-        static StackObject* GetMask_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* NameToLayer_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.String[] @layerNames = (System.String[])typeof(System.String[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            System.String @layerName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
 
 
-            var result_of_this_method = UnityEngine.LayerMask.GetMask(@layerNames);
+            var result_of_this_method = UnityEngine.LayerMask.NameToLayer(@layerName);
 
 
             __ret->ObjectType = ObjectTypes.Integer;
             __ret->ObjectType = ObjectTypes.Integer;
             __ret->Value = result_of_this_method;
             __ret->Value = result_of_this_method;
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
-        static StackObject* NameToLayer_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* LayerToName_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.String @layerName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
+            System.Int32 @layer = ptr_of_this_method->Value;
 
 
 
 
-            var result_of_this_method = UnityEngine.LayerMask.NameToLayer(@layerName);
+            var result_of_this_method = UnityEngine.LayerMask.LayerToName(@layer);
 
 
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method;
-            return __ret + 1;
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* LayerToName_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetMask_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
             StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Int32 @layer = ptr_of_this_method->Value;
+            System.String[] @layerNames = (System.String[])typeof(System.String[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
 
 
 
 
-            var result_of_this_method = UnityEngine.LayerMask.LayerToName(@layer);
+            var result_of_this_method = UnityEngine.LayerMask.GetMask(@layerNames);
 
 
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method;
+            return __ret + 1;
         }
         }
 
 
 
 

+ 44 - 4
Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_Mathf_Binding.cs

@@ -23,11 +23,17 @@ namespace ILRuntime.Runtime.Generated
             Type[] args;
             Type[] args;
             Type type = typeof(UnityEngine.Mathf);
             Type type = typeof(UnityEngine.Mathf);
             args = new Type[]{typeof(System.Single)};
             args = new Type[]{typeof(System.Single)};
+            method = type.GetMethod("Cos", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Cos_0);
+            args = new Type[]{typeof(System.Single)};
+            method = type.GetMethod("Sin", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Sin_1);
+            args = new Type[]{typeof(System.Single)};
             method = type.GetMethod("Sqrt", flag, null, args, null);
             method = type.GetMethod("Sqrt", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Sqrt_0);
+            app.RegisterCLRMethodRedirection(method, Sqrt_2);
             args = new Type[]{typeof(System.Single)};
             args = new Type[]{typeof(System.Single)};
             method = type.GetMethod("Abs", flag, null, args, null);
             method = type.GetMethod("Abs", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Abs_1);
+            app.RegisterCLRMethodRedirection(method, Abs_3);
 
 
             app.RegisterCLRCreateDefaultInstance(type, () => new UnityEngine.Mathf());
             app.RegisterCLRCreateDefaultInstance(type, () => new UnityEngine.Mathf());
 
 
@@ -80,7 +86,41 @@ namespace ILRuntime.Runtime.Generated
             }
             }
         }
         }
 
 
-        static StackObject* Sqrt_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Cos_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.Single @f = *(float*)&ptr_of_this_method->Value;
+
+
+            var result_of_this_method = UnityEngine.Mathf.Cos(@f);
+
+            __ret->ObjectType = ObjectTypes.Float;
+            *(float*)&__ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+        static StackObject* Sin_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.Single @f = *(float*)&ptr_of_this_method->Value;
+
+
+            var result_of_this_method = UnityEngine.Mathf.Sin(@f);
+
+            __ret->ObjectType = ObjectTypes.Float;
+            *(float*)&__ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+        static StackObject* Sqrt_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -97,7 +137,7 @@ namespace ILRuntime.Runtime.Generated
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
-        static StackObject* Abs_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Abs_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;

+ 60 - 26
Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_Object_Binding.cs

@@ -41,7 +41,7 @@ namespace ILRuntime.Runtime.Generated
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(UnityEngine.GameObject), typeof(UnityEngine.GameObject)))
+                    if(m.MatchGenericParameters(args, typeof(UnityEngine.GameObject), typeof(UnityEngine.GameObject), typeof(UnityEngine.Transform)))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, Instantiate_0);
                         app.RegisterCLRMethodRedirection(method, Instantiate_0);
@@ -55,7 +55,7 @@ namespace ILRuntime.Runtime.Generated
             {
             {
                 foreach(var m in lst)
                 foreach(var m in lst)
                 {
                 {
-                    if(m.MatchGenericParameters(args, typeof(UnityEngine.GameObject), typeof(UnityEngine.GameObject), typeof(UnityEngine.Transform), typeof(System.Boolean)))
+                    if(m.MatchGenericParameters(args, typeof(UnityEngine.GameObject), typeof(UnityEngine.GameObject)))
                     {
                     {
                         method = m.MakeGenericMethod(args);
                         method = m.MakeGenericMethod(args);
                         app.RegisterCLRMethodRedirection(method, Instantiate_1);
                         app.RegisterCLRMethodRedirection(method, Instantiate_1);
@@ -64,24 +64,58 @@ namespace ILRuntime.Runtime.Generated
                     }
                     }
                 }
                 }
             }
             }
+            args = new Type[]{typeof(UnityEngine.GameObject)};
+            if (genericMethods.TryGetValue("Instantiate", out lst))
+            {
+                foreach(var m in lst)
+                {
+                    if(m.MatchGenericParameters(args, typeof(UnityEngine.GameObject), typeof(UnityEngine.GameObject), typeof(UnityEngine.Transform), typeof(System.Boolean)))
+                    {
+                        method = m.MakeGenericMethod(args);
+                        app.RegisterCLRMethodRedirection(method, Instantiate_2);
+
+                        break;
+                    }
+                }
+            }
             args = new Type[]{typeof(UnityEngine.Object), typeof(UnityEngine.Object)};
             args = new Type[]{typeof(UnityEngine.Object), typeof(UnityEngine.Object)};
             method = type.GetMethod("op_Equality", flag, null, args, null);
             method = type.GetMethod("op_Equality", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, op_Equality_2);
+            app.RegisterCLRMethodRedirection(method, op_Equality_3);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("get_name", flag, null, args, null);
             method = type.GetMethod("get_name", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_name_3);
-            args = new Type[]{typeof(UnityEngine.Object), typeof(UnityEngine.Object)};
-            method = type.GetMethod("op_Inequality", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, op_Inequality_4);
+            app.RegisterCLRMethodRedirection(method, get_name_4);
             args = new Type[]{typeof(UnityEngine.Object)};
             args = new Type[]{typeof(UnityEngine.Object)};
             method = type.GetMethod("Destroy", flag, null, args, null);
             method = type.GetMethod("Destroy", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, Destroy_5);
             app.RegisterCLRMethodRedirection(method, Destroy_5);
+            args = new Type[]{typeof(UnityEngine.Object), typeof(UnityEngine.Object)};
+            method = type.GetMethod("op_Inequality", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, op_Inequality_6);
 
 
 
 
         }
         }
 
 
 
 
         static StackObject* Instantiate_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         static StackObject* Instantiate_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);
+            UnityEngine.Transform @parent = (UnityEngine.Transform)typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            UnityEngine.GameObject @original = (UnityEngine.GameObject)typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
+
+
+            var result_of_this_method = UnityEngine.Object.Instantiate<UnityEngine.GameObject>(@original, @parent);
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+        static StackObject* Instantiate_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -97,7 +131,7 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* Instantiate_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Instantiate_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -120,7 +154,7 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* op_Equality_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* op_Equality_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -142,7 +176,7 @@ namespace ILRuntime.Runtime.Generated
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
-        static StackObject* get_name_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_name_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -157,42 +191,42 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* op_Inequality_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Destroy_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            UnityEngine.Object @y = (UnityEngine.Object)typeof(UnityEngine.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            UnityEngine.Object @x = (UnityEngine.Object)typeof(UnityEngine.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            UnityEngine.Object @obj = (UnityEngine.Object)typeof(UnityEngine.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
 
 
-            var result_of_this_method = x != y;
+            UnityEngine.Object.Destroy(@obj);
 
 
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method ? 1 : 0;
-            return __ret + 1;
+            return __ret;
         }
         }
 
 
-        static StackObject* Destroy_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* op_Inequality_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            UnityEngine.Object @obj = (UnityEngine.Object)typeof(UnityEngine.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            UnityEngine.Object @y = (UnityEngine.Object)typeof(UnityEngine.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            UnityEngine.Object @x = (UnityEngine.Object)typeof(UnityEngine.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            __intp.Free(ptr_of_this_method);
 
 
-            UnityEngine.Object.Destroy(@obj);
 
 
-            return __ret;
+            var result_of_this_method = x != y;
+
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method ? 1 : 0;
+            return __ret + 1;
         }
         }
 
 
 
 

+ 19 - 41
Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_Transform_Binding.cs

@@ -22,102 +22,80 @@ namespace ILRuntime.Runtime.Generated
             MethodBase method;
             MethodBase method;
             Type[] args;
             Type[] args;
             Type type = typeof(UnityEngine.Transform);
             Type type = typeof(UnityEngine.Transform);
+            args = new Type[]{};
+            method = type.GetMethod("get_position", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_position_0);
             args = new Type[]{typeof(UnityEngine.Vector3)};
             args = new Type[]{typeof(UnityEngine.Vector3)};
             method = type.GetMethod("set_position", flag, null, args, null);
             method = type.GetMethod("set_position", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, set_position_0);
+            app.RegisterCLRMethodRedirection(method, set_position_1);
             args = new Type[]{typeof(UnityEngine.Quaternion)};
             args = new Type[]{typeof(UnityEngine.Quaternion)};
             method = type.GetMethod("set_rotation", flag, null, args, null);
             method = type.GetMethod("set_rotation", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, set_rotation_1);
-            args = new Type[]{typeof(UnityEngine.Transform)};
-            method = type.GetMethod("SetParent", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, SetParent_2);
-            args = new Type[]{};
-            method = type.GetMethod("get_position", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_position_3);
+            app.RegisterCLRMethodRedirection(method, set_rotation_2);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("SetAsFirstSibling", flag, null, args, null);
             method = type.GetMethod("SetAsFirstSibling", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, SetAsFirstSibling_4);
+            app.RegisterCLRMethodRedirection(method, SetAsFirstSibling_3);
             args = new Type[]{typeof(System.String)};
             args = new Type[]{typeof(System.String)};
             method = type.GetMethod("Find", flag, null, args, null);
             method = type.GetMethod("Find", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Find_5);
+            app.RegisterCLRMethodRedirection(method, Find_4);
 
 
 
 
         }
         }
 
 
 
 
-        static StackObject* set_position_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_position_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            UnityEngine.Vector3 @value = (UnityEngine.Vector3)typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
-            __intp.Free(ptr_of_this_method);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             UnityEngine.Transform instance_of_this_method = (UnityEngine.Transform)typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             UnityEngine.Transform instance_of_this_method = (UnityEngine.Transform)typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.position = value;
+            var result_of_this_method = instance_of_this_method.position;
 
 
-            return __ret;
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* set_rotation_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* set_position_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
             StackObject* __ret = ILIntepreter.Minus(__esp, 2);
             StackObject* __ret = ILIntepreter.Minus(__esp, 2);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            UnityEngine.Quaternion @value = (UnityEngine.Quaternion)typeof(UnityEngine.Quaternion).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
+            UnityEngine.Vector3 @value = (UnityEngine.Vector3)typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             UnityEngine.Transform instance_of_this_method = (UnityEngine.Transform)typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             UnityEngine.Transform instance_of_this_method = (UnityEngine.Transform)typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.rotation = value;
+            instance_of_this_method.position = value;
 
 
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* SetParent_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* set_rotation_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
             StackObject* __ret = ILIntepreter.Minus(__esp, 2);
             StackObject* __ret = ILIntepreter.Minus(__esp, 2);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            UnityEngine.Transform @p = (UnityEngine.Transform)typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
+            UnityEngine.Quaternion @value = (UnityEngine.Quaternion)typeof(UnityEngine.Quaternion).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             UnityEngine.Transform instance_of_this_method = (UnityEngine.Transform)typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             UnityEngine.Transform instance_of_this_method = (UnityEngine.Transform)typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
             __intp.Free(ptr_of_this_method);
             __intp.Free(ptr_of_this_method);
 
 
-            instance_of_this_method.SetParent(@p);
+            instance_of_this_method.rotation = value;
 
 
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* get_position_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);
-            UnityEngine.Transform instance_of_this_method = (UnityEngine.Transform)typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = instance_of_this_method.position;
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* SetAsFirstSibling_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* SetAsFirstSibling_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -132,7 +110,7 @@ namespace ILRuntime.Runtime.Generated
             return __ret;
             return __ret;
         }
         }
 
 
-        static StackObject* Find_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Find_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;

+ 24 - 24
Unity/Assets/Mono/ILRuntime/Generate/UnityEngine_Vector3_Binding.cs

@@ -23,24 +23,24 @@ namespace ILRuntime.Runtime.Generated
             FieldInfo field;
             FieldInfo field;
             Type[] args;
             Type[] args;
             Type type = typeof(UnityEngine.Vector3);
             Type type = typeof(UnityEngine.Vector3);
-            args = new Type[]{};
-            method = type.GetMethod("get_zero", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_zero_0);
             args = new Type[]{typeof(UnityEngine.Vector3), typeof(UnityEngine.Vector3), typeof(System.Single)};
             args = new Type[]{typeof(UnityEngine.Vector3), typeof(UnityEngine.Vector3), typeof(System.Single)};
             method = type.GetMethod("Lerp", flag, null, args, null);
             method = type.GetMethod("Lerp", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Lerp_1);
+            app.RegisterCLRMethodRedirection(method, Lerp_0);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("get_magnitude", flag, null, args, null);
             method = type.GetMethod("get_magnitude", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_magnitude_2);
+            app.RegisterCLRMethodRedirection(method, get_magnitude_1);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("get_sqrMagnitude", flag, null, args, null);
             method = type.GetMethod("get_sqrMagnitude", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_sqrMagnitude_3);
+            app.RegisterCLRMethodRedirection(method, get_sqrMagnitude_2);
             args = new Type[]{};
             args = new Type[]{};
             method = type.GetMethod("get_up", flag, null, args, null);
             method = type.GetMethod("get_up", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_up_4);
+            app.RegisterCLRMethodRedirection(method, get_up_3);
             args = new Type[]{typeof(UnityEngine.Vector3), typeof(UnityEngine.Vector3)};
             args = new Type[]{typeof(UnityEngine.Vector3), typeof(UnityEngine.Vector3)};
             method = type.GetMethod("op_Subtraction", flag, null, args, null);
             method = type.GetMethod("op_Subtraction", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, op_Subtraction_5);
+            app.RegisterCLRMethodRedirection(method, op_Subtraction_4);
+            args = new Type[]{};
+            method = type.GetMethod("get_zero", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_zero_5);
             args = new Type[]{typeof(UnityEngine.Vector3), typeof(UnityEngine.Vector3)};
             args = new Type[]{typeof(UnityEngine.Vector3), typeof(UnityEngine.Vector3)};
             method = type.GetMethod("op_Equality", flag, null, args, null);
             method = type.GetMethod("op_Equality", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, op_Equality_6);
             app.RegisterCLRMethodRedirection(method, op_Equality_6);
@@ -127,18 +127,7 @@ namespace ILRuntime.Runtime.Generated
             }
             }
         }
         }
 
 
-        static StackObject* get_zero_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
-
-
-            var result_of_this_method = UnityEngine.Vector3.zero;
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* Lerp_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Lerp_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -161,7 +150,7 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* get_magnitude_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_magnitude_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -182,7 +171,7 @@ namespace ILRuntime.Runtime.Generated
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
-        static StackObject* get_sqrMagnitude_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_sqrMagnitude_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -203,7 +192,7 @@ namespace ILRuntime.Runtime.Generated
             return __ret + 1;
             return __ret + 1;
         }
         }
 
 
-        static StackObject* get_up_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_up_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* __ret = ILIntepreter.Minus(__esp, 0);
             StackObject* __ret = ILIntepreter.Minus(__esp, 0);
@@ -214,7 +203,7 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
-        static StackObject* op_Subtraction_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* op_Subtraction_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
             StackObject* ptr_of_this_method;
@@ -234,6 +223,17 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
         }
 
 
+        static StackObject* get_zero_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
+
+
+            var result_of_this_method = UnityEngine.Vector3.zero;
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
         static StackObject* op_Equality_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         static StackObject* op_Equality_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;

+ 1 - 0
Unity/Codes/Hotfix/Client/AI/XunLuoPathComponentSystem.cs

@@ -2,6 +2,7 @@ using UnityEngine;
 
 
 namespace ET.Client
 namespace ET.Client
 {
 {
+    [FriendClass(typeof(XunLuoPathComponent))]
     public static class XunLuoPathComponentSystem
     public static class XunLuoPathComponentSystem
     {
     {
         public static Vector3 GetCurrent(this XunLuoPathComponent self)
         public static Vector3 GetCurrent(this XunLuoPathComponent self)

+ 1 - 1
Unity/Codes/Hotfix/Client/Login/EnterMapHelper.cs

@@ -10,7 +10,7 @@ namespace ET.Client
             try
             try
             {
             {
                 G2C_EnterMap g2CEnterMap = await zoneScene.GetComponent<SessionComponent>().Session.Call(new C2G_EnterMap()) as G2C_EnterMap;
                 G2C_EnterMap g2CEnterMap = await zoneScene.GetComponent<SessionComponent>().Session.Call(new C2G_EnterMap()) as G2C_EnterMap;
-                zoneScene.GetComponent<Client.PlayerComponent>().MyId = g2CEnterMap.MyId;
+                zoneScene.GetComponent<PlayerComponent>().MyId = g2CEnterMap.MyId;
                 
                 
                 // 等待场景切换完成
                 // 等待场景切换完成
                 await zoneScene.GetComponent<ObjectWait>().Wait<WaitType.Wait_SceneChangeFinish>();
                 await zoneScene.GetComponent<ObjectWait>().Wait<WaitType.Wait_SceneChangeFinish>();

+ 34 - 33
Unity/Codes/Hotfix/Client/Move/MoveComponentSystem.cs

@@ -4,50 +4,51 @@ using UnityEngine;
 
 
 namespace ET
 namespace ET
 {
 {
-    [Timer(TimerType.MoveTimer)]
-    public class MoveTimer: ATimer<MoveComponent>
+    [FriendClass(typeof(MoveComponent))]
+    public static class MoveComponentSystem
     {
     {
-        public override void Run(MoveComponent self)
+        [Timer(TimerType.MoveTimer)]
+        public class MoveTimer: ATimer<MoveComponent>
         {
         {
-            try
-            {
-                self.MoveForward(false);
-            }
-            catch (Exception e)
+            public override void Run(MoveComponent self)
             {
             {
-                Log.Error($"move timer error: {self.Id}\n{e}");
+                try
+                {
+                    self.MoveForward(false);
+                }
+                catch (Exception e)
+                {
+                    Log.Error($"move timer error: {self.Id}\n{e}");
+                }
             }
             }
         }
         }
-    }
     
     
-    [ObjectSystem]
-    public class MoveComponentDestroySystem: DestroySystem<MoveComponent>
-    {
-        public override void Destroy(MoveComponent self)
+        [ObjectSystem]
+        public class MoveComponentDestroySystem: DestroySystem<MoveComponent>
         {
         {
-            self.Clear();
+            public override void Destroy(MoveComponent self)
+            {
+                self.Clear();
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class MoveComponentAwakeSystem: AwakeSystem<MoveComponent>
-    {
-        public override void Awake(MoveComponent self)
+        [ObjectSystem]
+        public class MoveComponentAwakeSystem: AwakeSystem<MoveComponent>
         {
         {
-            self.StartTime = 0;
-            self.StartPos = Vector3.zero;
-            self.NeedTime = 0;
-            self.MoveTimer = 0;
-            self.Callback = null;
-            self.Targets.Clear();
-            self.Speed = 0;
-            self.N = 0;
-            self.TurnTime = 0;
+            public override void Awake(MoveComponent self)
+            {
+                self.StartTime = 0;
+                self.StartPos = Vector3.zero;
+                self.NeedTime = 0;
+                self.MoveTimer = 0;
+                self.Callback = null;
+                self.Targets.Clear();
+                self.Speed = 0;
+                self.N = 0;
+                self.TurnTime = 0;
+            }
         }
         }
-    }
-
-    public static class MoveComponentSystem
-    {
+        
         public static bool IsArrived(this MoveComponent self)
         public static bool IsArrived(this MoveComponent self)
         {
         {
             return self.Targets.Count == 0;
             return self.Targets.Count == 0;

+ 1 - 1
Unity/Codes/Hotfix/Client/Scene/SceneFactory.cs

@@ -9,7 +9,7 @@ namespace ET.Client
             zoneScene.AddComponent<NetKcpComponent, int>(SessionStreamDispatcherType.SessionStreamDispatcherClientOuter);
             zoneScene.AddComponent<NetKcpComponent, int>(SessionStreamDispatcherType.SessionStreamDispatcherClientOuter);
 			zoneScene.AddComponent<CurrentScenesComponent>();
 			zoneScene.AddComponent<CurrentScenesComponent>();
             zoneScene.AddComponent<ObjectWait>();
             zoneScene.AddComponent<ObjectWait>();
-            zoneScene.AddComponent<Client.PlayerComponent>();
+            zoneScene.AddComponent<PlayerComponent>();
             
             
             Game.EventSystem.Publish(new EventType.AfterCreateZoneScene() {ZoneScene = zoneScene});
             Game.EventSystem.Publish(new EventType.AfterCreateZoneScene() {ZoneScene = zoneScene});
             return zoneScene;
             return zoneScene;

+ 15 - 14
Unity/Codes/Hotfix/Client/Scene/ZoneSceneManagerComponentSystem.cs

@@ -2,26 +2,27 @@
 
 
 namespace ET.Client
 namespace ET.Client
 {
 {
-    [ObjectSystem]
-    public class ZoneSceneManagerComponentAwakeSystem: AwakeSystem<ZoneSceneManagerComponent>
+    [FriendClass(typeof(ZoneSceneManagerComponent))]
+    public static class ZoneSceneManagerComponentSystem
     {
     {
-        public override void Awake(ZoneSceneManagerComponent self)
+        [ObjectSystem]
+        public class ZoneSceneManagerComponentAwakeSystem: AwakeSystem<ZoneSceneManagerComponent>
         {
         {
-            ZoneSceneManagerComponent.Instance = self;
+            public override void Awake(ZoneSceneManagerComponent self)
+            {
+                ZoneSceneManagerComponent.Instance = self;
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class ZoneSceneManagerComponentDestroySystem: DestroySystem<ZoneSceneManagerComponent>
-    {
-        public override void Destroy(ZoneSceneManagerComponent self)
+        [ObjectSystem]
+        public class ZoneSceneManagerComponentDestroySystem: DestroySystem<ZoneSceneManagerComponent>
         {
         {
-            self.ZoneScenes.Clear();
+            public override void Destroy(ZoneSceneManagerComponent self)
+            {
+                self.ZoneScenes.Clear();
+            }
         }
         }
-    }
-
-    public static class ZoneSceneManagerComponentSystem
-    {
+        
         public static Scene ZoneScene(this Entity entity)
         public static Scene ZoneScene(this Entity entity)
         {
         {
             return ZoneSceneManagerComponent.Instance.Get(entity.DomainZone());
             return ZoneSceneManagerComponent.Instance.Get(entity.DomainZone());

+ 1 - 1
Unity/Codes/Hotfix/Client/Unit/M2C_CreateUnitsHandler.cs

@@ -14,7 +14,7 @@
 				{
 				{
 					continue;
 					continue;
 				}
 				}
-				Unit unit = Client.UnitFactory.Create(currentScene, unitInfo);
+				Unit unit = UnitFactory.Create(currentScene, unitInfo);
 			}
 			}
 			await ETTask.CompletedTask;
 			await ETTask.CompletedTask;
 		}
 		}

+ 2 - 2
Unity/Codes/Hotfix/Client/Unit/UnitHelper.cs

@@ -4,14 +4,14 @@
     {
     {
         public static Unit GetMyUnitFromZoneScene(Scene zoneScene)
         public static Unit GetMyUnitFromZoneScene(Scene zoneScene)
         {
         {
-            Client.PlayerComponent playerComponent = zoneScene.GetComponent<Client.PlayerComponent>();
+            PlayerComponent playerComponent = zoneScene.GetComponent<PlayerComponent>();
             Scene currentScene = zoneScene.GetComponent<CurrentScenesComponent>().Scene;
             Scene currentScene = zoneScene.GetComponent<CurrentScenesComponent>().Scene;
             return currentScene.GetComponent<UnitComponent>().Get(playerComponent.MyId);
             return currentScene.GetComponent<UnitComponent>().Get(playerComponent.MyId);
         }
         }
         
         
         public static Unit GetMyUnitFromCurrentScene(Scene currentScene)
         public static Unit GetMyUnitFromCurrentScene(Scene currentScene)
         {
         {
-            Client.PlayerComponent playerComponent = currentScene.Parent.Parent.GetComponent<Client.PlayerComponent>();
+            PlayerComponent playerComponent = currentScene.Parent.Parent.GetComponent<PlayerComponent>();
             return currentScene.GetComponent<UnitComponent>().Get(playerComponent.MyId);
             return currentScene.GetComponent<UnitComponent>().Get(playerComponent.MyId);
         }
         }
     }
     }

+ 31 - 30
Unity/Codes/Hotfix/Module/AI/AIComponentSystem.cs

@@ -1,48 +1,49 @@
 using System;
 using System;
-using UnityEngine;
 
 
 namespace ET
 namespace ET
 {
 {
-    [Timer(TimerType.AITimer)]
-    public class AITimer: ATimer<AIComponent>
+    [FriendClass(typeof(AIComponent))]
+    [FriendClass(typeof(AIDispatcherComponent))]
+    public static class AIComponentSystem
     {
     {
-        public override void Run(AIComponent self)
+        [Timer(TimerType.AITimer)]
+        public class AITimer: ATimer<AIComponent>
         {
         {
-            try
-            {
-                self.Check();
-            }
-            catch (Exception e)
+            public override void Run(AIComponent self)
             {
             {
-                Log.Error($"move timer error: {self.Id}\n{e}");
+                try
+                {
+                    self.Check();
+                }
+                catch (Exception e)
+                {
+                    Log.Error($"move timer error: {self.Id}\n{e}");
+                }
             }
             }
         }
         }
-    }
     
     
-    [ObjectSystem]
-    public class AIComponentAwakeSystem: AwakeSystem<AIComponent, int>
-    {
-        public override void Awake(AIComponent self, int aiConfigId)
+        [ObjectSystem]
+        public class AIComponentAwakeSystem: AwakeSystem<AIComponent, int>
         {
         {
-            self.AIConfigId = aiConfigId;
-            self.Timer = TimerComponent.Instance.NewRepeatedTimer(1000, TimerType.AITimer, self);
+            public override void Awake(AIComponent self, int aiConfigId)
+            {
+                self.AIConfigId = aiConfigId;
+                self.Timer = TimerComponent.Instance.NewRepeatedTimer(1000, TimerType.AITimer, self);
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class AIComponentDestroySystem: DestroySystem<AIComponent>
-    {
-        public override void Destroy(AIComponent self)
+        [ObjectSystem]
+        public class AIComponentDestroySystem: DestroySystem<AIComponent>
         {
         {
-            TimerComponent.Instance?.Remove(ref self.Timer);
-            self.CancellationToken?.Cancel();
-            self.CancellationToken = null;
-            self.Current = 0;
+            public override void Destroy(AIComponent self)
+            {
+                TimerComponent.Instance?.Remove(ref self.Timer);
+                self.CancellationToken?.Cancel();
+                self.CancellationToken = null;
+                self.Current = 0;
+            }
         }
         }
-    }
-
-    public static class AIComponentSystem
-    {
+        
         public static void Check(this AIComponent self)
         public static void Check(this AIComponent self)
         {
         {
             if (self.Parent == null)
             if (self.Parent == null)

+ 23 - 24
Unity/Codes/Hotfix/Module/AI/AIDispatcherComponentSystem.cs

@@ -1,40 +1,39 @@
 using System;
 using System;
-using System.Collections.Generic;
-using System.Linq;
 
 
 namespace ET
 namespace ET
 {
 {
-    [ObjectSystem]
-    public class AIDispatcherComponentAwakeSystem: AwakeSystem<AIDispatcherComponent>
+    [FriendClass(typeof(AIDispatcherComponent))]
+    public static class AIDispatcherComponentSystem
     {
     {
-        public override void Awake(AIDispatcherComponent self)
+        [ObjectSystem]
+        public class AIDispatcherComponentAwakeSystem: AwakeSystem<AIDispatcherComponent>
         {
         {
-            AIDispatcherComponent.Instance = self;
-            self.Load();
+            public override void Awake(AIDispatcherComponent self)
+            {
+                AIDispatcherComponent.Instance = self;
+                self.Load();
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class AIDispatcherComponentLoadSystem: LoadSystem<AIDispatcherComponent>
-    {
-        public override void Load(AIDispatcherComponent self)
+        [ObjectSystem]
+        public class AIDispatcherComponentLoadSystem: LoadSystem<AIDispatcherComponent>
         {
         {
-            self.Load();
+            public override void Load(AIDispatcherComponent self)
+            {
+                self.Load();
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class AIDispatcherComponentDestroySystem: DestroySystem<AIDispatcherComponent>
-    {
-        public override void Destroy(AIDispatcherComponent self)
+        [ObjectSystem]
+        public class AIDispatcherComponentDestroySystem: DestroySystem<AIDispatcherComponent>
         {
         {
-            self.AIHandlers.Clear();
-            AIDispatcherComponent.Instance = null;
+            public override void Destroy(AIDispatcherComponent self)
+            {
+                self.AIHandlers.Clear();
+                AIDispatcherComponent.Instance = null;
+            }
         }
         }
-    }
-
-    public static class AIDispatcherComponentSystem
-    {
+        
         public static void Load(this AIDispatcherComponent self)
         public static void Load(this AIDispatcherComponent self)
         {
         {
             self.AIHandlers.Clear();
             self.AIHandlers.Clear();

+ 20 - 19
Unity/Codes/Hotfix/Module/Config/ConfigComponentSystem.cs

@@ -4,26 +4,27 @@ using System.Threading.Tasks;
 
 
 namespace ET
 namespace ET
 {
 {
-	[ObjectSystem]
-    public class ConfigAwakeSystem : AwakeSystem<ConfigComponent>
-    {
-        public override void Awake(ConfigComponent self)
-        {
-	        ConfigComponent.Instance = self;
-        }
-    }
-    
-    [ObjectSystem]
-    public class ConfigDestroySystem : DestroySystem<ConfigComponent>
-    {
-	    public override void Destroy(ConfigComponent self)
-	    {
-		    ConfigComponent.Instance = null;
-	    }
-    }
-    
-    public static class ConfigComponentSystem
+	[FriendClass(typeof(ConfigComponent))]
+	public static class ConfigComponentSystem
 	{
 	{
+		[ObjectSystem]
+		public class ConfigAwakeSystem : AwakeSystem<ConfigComponent>
+		{
+			public override void Awake(ConfigComponent self)
+			{
+				ConfigComponent.Instance = self;
+			}
+		}
+    
+		[ObjectSystem]
+		public class ConfigDestroySystem : DestroySystem<ConfigComponent>
+		{
+			public override void Destroy(ConfigComponent self)
+			{
+				ConfigComponent.Instance = null;
+			}
+		}
+		
 		public static void LoadOneConfig(this ConfigComponent self, Type configType)
 		public static void LoadOneConfig(this ConfigComponent self, Type configType)
 		{
 		{
 			byte[] oneConfigBytes = self.ConfigLoader.GetOneConfigBytes(configType.FullName);
 			byte[] oneConfigBytes = self.ConfigLoader.GetOneConfigBytes(configType.FullName);

+ 26 - 25
Unity/Codes/Hotfix/Module/Message/MessageDispatcherComponentSystem.cs

@@ -3,40 +3,41 @@ using System.Collections.Generic;
 
 
 namespace ET
 namespace ET
 {
 {
-    [ObjectSystem]
-    public class MessageDispatcherComponentAwakeSystem: AwakeSystem<MessageDispatcherComponent>
+    /// <summary>
+    /// 消息分发组件
+    /// </summary>
+    [FriendClass(typeof(MessageDispatcherComponent))]
+    public static class MessageDispatcherComponentHelper
     {
     {
-        public override void Awake(MessageDispatcherComponent self)
+        [ObjectSystem]
+        public class MessageDispatcherComponentAwakeSystem: AwakeSystem<MessageDispatcherComponent>
         {
         {
-            MessageDispatcherComponent.Instance = self;
-            self.Load();
+            public override void Awake(MessageDispatcherComponent self)
+            {
+                MessageDispatcherComponent.Instance = self;
+                self.Load();
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class MessageDispatcherComponentLoadSystem: LoadSystem<MessageDispatcherComponent>
-    {
-        public override void Load(MessageDispatcherComponent self)
+        [ObjectSystem]
+        public class MessageDispatcherComponentLoadSystem: LoadSystem<MessageDispatcherComponent>
         {
         {
-            self.Load();
+            public override void Load(MessageDispatcherComponent self)
+            {
+                self.Load();
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class MessageDispatcherComponentDestroySystem: DestroySystem<MessageDispatcherComponent>
-    {
-        public override void Destroy(MessageDispatcherComponent self)
+        [ObjectSystem]
+        public class MessageDispatcherComponentDestroySystem: DestroySystem<MessageDispatcherComponent>
         {
         {
-            MessageDispatcherComponent.Instance = null;
-            self.Handlers.Clear();
+            public override void Destroy(MessageDispatcherComponent self)
+            {
+                MessageDispatcherComponent.Instance = null;
+                self.Handlers.Clear();
+            }
         }
         }
-    }
-
-    /// <summary>
-    /// 消息分发组件
-    /// </summary>
-    public static class MessageDispatcherComponentHelper
-    {
+        
         public static void Load(this MessageDispatcherComponent self)
         public static void Load(this MessageDispatcherComponent self)
         {
         {
             self.Handlers.Clear();
             self.Handlers.Clear();

+ 31 - 30
Unity/Codes/Hotfix/Module/Message/NetKcpComponentSystem.cs

@@ -4,49 +4,50 @@ using System.Net;
 
 
 namespace ET
 namespace ET
 {
 {
-    [ObjectSystem]
-    public class NetKcpComponentAwakeSystem: AwakeSystem<NetKcpComponent, int>
+    [FriendClass(typeof(NetKcpComponent))]
+    public static class NetKcpComponentSystem
     {
     {
-        public override void Awake(NetKcpComponent self, int sessionStreamDispatcherType)
+        [ObjectSystem]
+        public class NetKcpComponentAwakeSystem: AwakeSystem<NetKcpComponent, int>
         {
         {
-            self.SessionStreamDispatcherType = sessionStreamDispatcherType;
+            public override void Awake(NetKcpComponent self, int sessionStreamDispatcherType)
+            {
+                self.SessionStreamDispatcherType = sessionStreamDispatcherType;
             
             
-            self.Service = new TService(NetThreadComponent.Instance.ThreadSynchronizationContext, ServiceType.Outer);
-            self.Service.ErrorCallback += (channelId, error) => self.OnError(channelId, error);
-            self.Service.ReadCallback += (channelId, Memory) => self.OnRead(channelId, Memory);
+                self.Service = new TService(NetThreadComponent.Instance.ThreadSynchronizationContext, ServiceType.Outer);
+                self.Service.ErrorCallback += (channelId, error) => self.OnError(channelId, error);
+                self.Service.ReadCallback += (channelId, Memory) => self.OnRead(channelId, Memory);
 
 
-            NetThreadComponent.Instance.Add(self.Service);
+                NetThreadComponent.Instance.Add(self.Service);
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class NetKcpComponentAwake1System: AwakeSystem<NetKcpComponent, IPEndPoint, int>
-    {
-        public override void Awake(NetKcpComponent self, IPEndPoint address, int sessionStreamDispatcherType)
+        [ObjectSystem]
+        public class NetKcpComponentAwake1System: AwakeSystem<NetKcpComponent, IPEndPoint, int>
         {
         {
-            self.SessionStreamDispatcherType = sessionStreamDispatcherType;
+            public override void Awake(NetKcpComponent self, IPEndPoint address, int sessionStreamDispatcherType)
+            {
+                self.SessionStreamDispatcherType = sessionStreamDispatcherType;
             
             
-            self.Service = new TService(NetThreadComponent.Instance.ThreadSynchronizationContext, address, ServiceType.Outer);
-            self.Service.ErrorCallback += (channelId, error) => self.OnError(channelId, error);
-            self.Service.ReadCallback += (channelId, Memory) => self.OnRead(channelId, Memory);
-            self.Service.AcceptCallback += (channelId, IPAddress) => self.OnAccept(channelId, IPAddress);
+                self.Service = new TService(NetThreadComponent.Instance.ThreadSynchronizationContext, address, ServiceType.Outer);
+                self.Service.ErrorCallback += (channelId, error) => self.OnError(channelId, error);
+                self.Service.ReadCallback += (channelId, Memory) => self.OnRead(channelId, Memory);
+                self.Service.AcceptCallback += (channelId, IPAddress) => self.OnAccept(channelId, IPAddress);
 
 
-            NetThreadComponent.Instance.Add(self.Service);
+                NetThreadComponent.Instance.Add(self.Service);
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class NetKcpComponentDestroySystem: DestroySystem<NetKcpComponent>
-    {
-        public override void Destroy(NetKcpComponent self)
+        [ObjectSystem]
+        public class NetKcpComponentDestroySystem: DestroySystem<NetKcpComponent>
         {
         {
-            NetThreadComponent.Instance.Remove(self.Service);
-            self.Service.Destroy();
+            public override void Destroy(NetKcpComponent self)
+            {
+                NetThreadComponent.Instance.Remove(self.Service);
+                self.Service.Destroy();
+            }
         }
         }
-    }
-
-    public static class NetKcpComponentSystem
-    {
+        
         public static void OnRead(this NetKcpComponent self, long channelId, MemoryStream memoryStream)
         public static void OnRead(this NetKcpComponent self, long channelId, MemoryStream memoryStream)
         {
         {
             Session session = self.GetChild<Session>(channelId);
             Session session = self.GetChild<Session>(channelId);

+ 22 - 22
Unity/Codes/Hotfix/Module/Message/NetThreadComponentSystem.cs

@@ -3,40 +3,40 @@ using System.Threading;
 
 
 namespace ET
 namespace ET
 {
 {
-    [ObjectSystem]
-    public class NetThreadComponentAwakeSystem: AwakeSystem<NetThreadComponent>
+    [FriendClass(typeof(NetThreadComponent))]
+    public static class NetThreadComponentSystem
     {
     {
-        public override void Awake(NetThreadComponent self)
+        [ObjectSystem]
+        public class NetThreadComponentAwakeSystem: AwakeSystem<NetThreadComponent>
         {
         {
-            NetThreadComponent.Instance = self;
+            public override void Awake(NetThreadComponent self)
+            {
+                NetThreadComponent.Instance = self;
             
             
-            self.ThreadSynchronizationContext = ThreadSynchronizationContext.Instance;
+                self.ThreadSynchronizationContext = ThreadSynchronizationContext.Instance;
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class NetThreadComponentUpdateSystem: LateUpdateSystem<NetThreadComponent>
-    {
-        public override void LateUpdate(NetThreadComponent self)
+        [ObjectSystem]
+        public class NetThreadComponentUpdateSystem: LateUpdateSystem<NetThreadComponent>
         {
         {
-            foreach (AService service in self.Services)
+            public override void LateUpdate(NetThreadComponent self)
             {
             {
-                service.Update();
+                foreach (AService service in self.Services)
+                {
+                    service.Update();
+                }
             }
             }
         }
         }
-    }
     
     
-    [ObjectSystem]
-    public class NetThreadComponentDestroySystem: DestroySystem<NetThreadComponent>
-    {
-        public override void Destroy(NetThreadComponent self)
+        [ObjectSystem]
+        public class NetThreadComponentDestroySystem: DestroySystem<NetThreadComponent>
         {
         {
-            self.Stop();
+            public override void Destroy(NetThreadComponent self)
+            {
+                self.Stop();
+            }
         }
         }
-    }
-    
-    public static class NetThreadComponentSystem
-    {
 
 
         public static void Stop(this NetThreadComponent self)
         public static void Stop(this NetThreadComponent self)
         {
         {

+ 22 - 21
Unity/Codes/Hotfix/Module/Message/SessionStreamDispatcherSystem.cs

@@ -4,36 +4,37 @@ using System.IO;
 
 
 namespace ET
 namespace ET
 {
 {
-    [ObjectSystem]
-    public class SessionStreamDispatcherAwakeSystem: AwakeSystem<SessionStreamDispatcher>
+    [FriendClass(typeof(SessionStreamDispatcher))]
+    public static class SessionStreamDispatcherSystem
     {
     {
-        public override void Awake(SessionStreamDispatcher self)
+        [ObjectSystem]
+        public class SessionStreamDispatcherAwakeSystem: AwakeSystem<SessionStreamDispatcher>
         {
         {
-            SessionStreamDispatcher.Instance = self;
-            self.Load();
+            public override void Awake(SessionStreamDispatcher self)
+            {
+                SessionStreamDispatcher.Instance = self;
+                self.Load();
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class SessionStreamDispatcherLoadSystem: LoadSystem<SessionStreamDispatcher>
-    {
-        public override void Load(SessionStreamDispatcher self)
+        [ObjectSystem]
+        public class SessionStreamDispatcherLoadSystem: LoadSystem<SessionStreamDispatcher>
         {
         {
-            self.Load();
+            public override void Load(SessionStreamDispatcher self)
+            {
+                self.Load();
+            }
         }
         }
-    }
 
 
-    [ObjectSystem]
-    public class SessionStreamDispatcherDestroySystem: DestroySystem<SessionStreamDispatcher>
-    {
-        public override void Destroy(SessionStreamDispatcher self)
+        [ObjectSystem]
+        public class SessionStreamDispatcherDestroySystem: DestroySystem<SessionStreamDispatcher>
         {
         {
-            SessionStreamDispatcher.Instance = null;
+            public override void Destroy(SessionStreamDispatcher self)
+            {
+                SessionStreamDispatcher.Instance = null;
+            }
         }
         }
-    }
-    
-    public static class SessionStreamDispatcherSystem
-    {
+        
         public static void Load(this SessionStreamDispatcher self)
         public static void Load(this SessionStreamDispatcher self)
         {
         {
             self.Dispatchers = new ISessionStreamDispatcher[100];
             self.Dispatchers = new ISessionStreamDispatcher[100];

Некоторые файлы не были показаны из-за большого количества измененных файлов