Sfoglia il codice sorgente

ILRuntime生成Resources.Load生成binding会抛出的一个异常。封装了一下Resources.Load方法,hotfix层不直接调用Resources.Load而使用ResourcesHelper.Load来加载资源,这样能够绕过这个错误。

tanghai 7 anni fa
parent
commit
c0788d6b2e

+ 5 - 0
Unity/Assets/Scripts/Helper/ResourcesHelper.cs

@@ -12,6 +12,11 @@ namespace ETModel
 {
 	public static class ResourcesHelper
 	{
+		public static UnityEngine.Object Load(string path)
+		{
+			return Resources.Load(path);
+		}
+
 		public static string[] GetDependencies(string assetBundleName)
 		{
 			string[] dependencies = new string[0];

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

@@ -23,7 +23,7 @@ namespace ETModel
 		{
 			try
 			{
-				GameObject config = (GameObject)Resources.Load("KV");
+				GameObject config = (GameObject)ResourcesHelper.Load("KV");
 				string configStr = config.Get<TextAsset>("GlobalProto").text;
 				return configStr;
 			}

+ 1 - 1
Unity/Assets/Scripts/UI/UILoading/Factory/UILoadingFactory.cs

@@ -10,7 +10,7 @@ namespace ETModel
         {
 	        try
 	        {
-				GameObject bundleGameObject = ((GameObject)Resources.Load("KV")).Get<GameObject>(type);
+				GameObject bundleGameObject = ((GameObject)ResourcesHelper.Load("KV")).Get<GameObject>(type);
 				GameObject go = UnityEngine.Object.Instantiate(bundleGameObject);
 				go.layer = LayerMask.NameToLayer(LayerNames.UI);
 				UI ui = ComponentFactory.Create<UI, GameObject>(go);

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

@@ -42,6 +42,7 @@ namespace ILRuntime.Runtime.Generated
             VInt3_Binding.Register(app);
             ETModel_PlayerComponent_Binding.Register(app);
             ETModel_Player_Binding.Register(app);
+            ETModel_ComponentWithId_Binding.Register(app);
             ETModel_CameraComponent_Binding.Register(app);
             System_IDisposable_Binding.Register(app);
             ETModel_Actor_Test_Binding.Register(app);
@@ -53,22 +54,23 @@ namespace ILRuntime.Runtime.Generated
             System_Activator_Binding.Register(app);
             ETModel_GameObjectHelper_Binding.Register(app);
             UnityEngine_TextAsset_Binding.Register(app);
-            //UnityEngine_Resources_Binding.Register(app);
-            System_Object_Binding.Register(app);
+            ETModel_IdGenerater_Binding.Register(app);
             System_Collections_Generic_HashSet_1_ILTypeInstance_Binding.Register(app);
+            System_Object_Binding.Register(app);
             System_Linq_Enumerable_Binding.Register(app);
             System_Collections_Generic_HashSet_1_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
-            ETModel_IdGenerater_Binding.Register(app);
             System_Collections_Generic_List_1_Object_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_String_List_1_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_List_1_ILTypeInstance_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_Binding.Register(app);
             ETModel_UnOrderMultiMap_2_Type_ILTypeInstance_Binding.Register(app);
-            System_Collections_Generic_Queue_1_ILTypeInstance_Binding.Register(app);
+            System_Collections_Generic_Queue_1_Int64_Binding.Register(app);
             System_Collections_Generic_List_1_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
             ETModel_AEventAttribute_Binding.Register(app);
             ETModel_EventProxy_Binding.Register(app);
             ETModel_EventSystem_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_Queue_1_ILTypeInstance_Binding.Register(app);
+            System_Collections_Generic_Queue_1_ILTypeInstance_Binding.Register(app);
             ETModel_Packet_Binding.Register(app);
             ETModel_ProtobufHelper_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Int32_Action_1_ILTypeInstance_Binding.Register(app);
@@ -90,6 +92,7 @@ namespace ILRuntime.Runtime.Generated
             ETModel_CanvasConfig_Binding.Register(app);
             UnityEngine_Transform_Binding.Register(app);
             System_Collections_Generic_List_1_String_Binding.Register(app);
+            ETModel_Component_Binding.Register(app);
             ETModel_Scene_Binding.Register(app);
             UnityEngine_Object_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding_ValueCollection_Binding.Register(app);
@@ -109,7 +112,6 @@ namespace ILRuntime.Runtime.Generated
             UnityEngine_UI_InputField_Binding.Register(app);
             ETModel_NetworkComponent_Binding.Register(app);
             ETModel_ComponentFactory_Binding.Register(app);
-            System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_Binding.Register(app);
         }
     }
 }

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

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

+ 2 - 2
Unity/Assets/ThirdParty/ILRuntime/Generated/ETModel_Disposer_Binding.cs.meta → Unity/Assets/ThirdParty/ILRuntime/Generated/ETModel_ComponentWithId_Binding.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: d61ffdec0a7f0264ab9932cf164ba5cb
-timeCreated: 1520320314
+guid: b812c5d2e1eabc140882336a19577ae3
+timeCreated: 1521630297
 licenseType: Free
 MonoImporter:
   serializedVersion: 2

+ 31 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/ETModel_Component_Binding.cs

@@ -15,6 +15,37 @@ namespace ILRuntime.Runtime.Generated
 {
     unsafe class ETModel_Component_Binding
     {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(ETModel.Component);
+            args = new Type[]{};
+            method = type.GetMethod("Dispose", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Dispose_0);
+
+
+        }
+
+
+        static StackObject* Dispose_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* ptr_of_this_method;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            ETModel.Component instance_of_this_method;
+            instance_of_this_method = (ETModel.Component)typeof(ETModel.Component).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Dispose();
+
+            return __ret;
+        }
+
+
 
     }
 }

+ 0 - 20
Unity/Assets/ThirdParty/ILRuntime/Generated/ETModel_Disposer_Binding.cs

@@ -1,20 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-using ILRuntime.CLR.TypeSystem;
-using ILRuntime.CLR.Method;
-using ILRuntime.Runtime.Enviorment;
-using ILRuntime.Runtime.Intepreter;
-using ILRuntime.Runtime.Stack;
-using ILRuntime.Reflection;
-using ILRuntime.CLR.Utils;
-
-namespace ILRuntime.Runtime.Generated
-{
-    unsafe class ETModel_Disposer_Binding
-    {
-
-    }
-}

+ 26 - 4
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_B_t.cs

@@ -25,12 +25,15 @@ namespace ILRuntime.Runtime.Generated
             args = new Type[]{typeof(System.Int64), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
             method = type.GetMethod("Add", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, Add_0);
+            args = new Type[]{typeof(System.Int64)};
+            method = type.GetMethod("Remove", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Remove_1);
             args = new Type[]{typeof(System.Int64), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).MakeByRefType()};
             method = type.GetMethod("TryGetValue", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, TryGetValue_1);
+            app.RegisterCLRMethodRedirection(method, TryGetValue_2);
             args = new Type[]{};
             method = type.GetMethod("get_Values", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Values_2);
+            app.RegisterCLRMethodRedirection(method, get_Values_3);
 
             args = new Type[]{};
             method = type.GetConstructor(flag, null, args, null);
@@ -59,7 +62,26 @@ namespace ILRuntime.Runtime.Generated
             return __ret;
         }
 
-        static StackObject* TryGetValue_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Remove_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.Int64 key = *(long*)&ptr_of_this_method->Value;
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method;
+            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));
+            __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* TryGetValue_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
@@ -135,7 +157,7 @@ namespace ILRuntime.Runtime.Generated
             return __ret + 1;
         }
 
-        static StackObject* get_Values_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_Values_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;

+ 19 - 19
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_Generic_Queue_1_ILTypeInstance_Binding.cs

@@ -22,15 +22,15 @@ namespace ILRuntime.Runtime.Generated
             FieldInfo field;
             Type[] args;
             Type type = typeof(System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>);
-            args = new Type[]{typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
-            method = type.GetMethod("Enqueue", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Enqueue_0);
+            args = new Type[]{};
+            method = type.GetMethod("get_Count", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_Count_0);
             args = new Type[]{};
             method = type.GetMethod("Dequeue", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, Dequeue_1);
-            args = new Type[]{};
-            method = type.GetMethod("get_Count", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Count_2);
+            args = new Type[]{typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
+            method = type.GetMethod("Enqueue", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Enqueue_2);
 
             args = new Type[]{};
             method = type.GetConstructor(flag, null, args, null);
@@ -39,22 +39,21 @@ namespace ILRuntime.Runtime.Generated
         }
 
 
-        static StackObject* Enqueue_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, 2);
+            StackObject* __ret = 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));
-            __intp.Free(ptr_of_this_method);
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method;
             instance_of_this_method = (System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
-            instance_of_this_method.Enqueue(item);
+            var result_of_this_method = instance_of_this_method.Count;
 
-            return __ret;
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method;
+            return __ret + 1;
         }
 
         static StackObject* Dequeue_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
@@ -72,21 +71,22 @@ namespace ILRuntime.Runtime.Generated
             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* Enqueue_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);
+            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));
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method;
             instance_of_this_method = (System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
-            var result_of_this_method = instance_of_this_method.Count;
+            instance_of_this_method.Enqueue(item);
 
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method;
-            return __ret + 1;
+            return __ret;
         }
 
 

+ 107 - 0
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_Generic_Queue_1_Int64_Binding.cs

@@ -0,0 +1,107 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class System_Collections_Generic_Queue_1_Int64_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(System.Collections.Generic.Queue<System.Int64>);
+            args = new Type[]{typeof(System.Int64)};
+            method = type.GetMethod("Enqueue", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Enqueue_0);
+            args = new Type[]{};
+            method = type.GetMethod("Dequeue", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Dequeue_1);
+            args = new Type[]{};
+            method = type.GetMethod("get_Count", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_Count_2);
+
+            args = new Type[]{};
+            method = type.GetConstructor(flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Ctor_0);
+
+        }
+
+
+        static StackObject* Enqueue_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.Int64 item = *(long*)&ptr_of_this_method->Value;
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Collections.Generic.Queue<System.Int64> instance_of_this_method;
+            instance_of_this_method = (System.Collections.Generic.Queue<System.Int64>)typeof(System.Collections.Generic.Queue<System.Int64>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Enqueue(item);
+
+            return __ret;
+        }
+
+        static StackObject* Dequeue_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.Queue<System.Int64> instance_of_this_method;
+            instance_of_this_method = (System.Collections.Generic.Queue<System.Int64>)typeof(System.Collections.Generic.Queue<System.Int64>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.Dequeue();
+
+            __ret->ObjectType = ObjectTypes.Long;
+            *(long*)&__ret->Value = result_of_this_method;
+            return __ret + 1;
+        }
+
+        static StackObject* get_Count_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.Queue<System.Int64> instance_of_this_method;
+            instance_of_this_method = (System.Collections.Generic.Queue<System.Int64>)typeof(System.Collections.Generic.Queue<System.Int64>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __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* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* ptr_of_this_method;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
+
+            var result_of_this_method = new System.Collections.Generic.Queue<System.Int64>();
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+    }
+}

+ 2 - 2
Unity/Assets/ThirdParty/ILRuntime/Generated/UnityEngine_Resources_Binding.cs.meta → Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_Generic_Queue_1_Int64_Binding.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: 668a581bb061d7f4eb90186f63b77872
-timeCreated: 1520320313
+guid: 6a5a679b70528584d831b66117f59557
+timeCreated: 1521630297
 licenseType: Free
 MonoImporter:
   serializedVersion: 2

+ 2 - 20
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Object_Binding.cs

@@ -23,32 +23,14 @@ namespace ILRuntime.Runtime.Generated
             Type[] args;
             Type type = typeof(System.Object);
             args = new Type[]{};
-            method = type.GetMethod("ToString", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, ToString_0);
-            args = new Type[]{};
             method = type.GetMethod("GetType", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, GetType_1);
+            app.RegisterCLRMethodRedirection(method, GetType_0);
 
 
         }
 
 
-        static StackObject* ToString_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 instance_of_this_method;
-            instance_of_this_method = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = instance_of_this_method.ToString();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* GetType_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* GetType_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;

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

@@ -1,55 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-using ILRuntime.CLR.TypeSystem;
-using ILRuntime.CLR.Method;
-using ILRuntime.Runtime.Enviorment;
-using ILRuntime.Runtime.Intepreter;
-using ILRuntime.Runtime.Stack;
-using ILRuntime.Reflection;
-using ILRuntime.CLR.Utils;
-
-namespace ILRuntime.Runtime.Generated
-{
-    unsafe class UnityEngine_Resources_Binding
-    {
-        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
-        {
-            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
-            MethodBase method;
-            FieldInfo field;
-            Type[] args;
-            Type type = typeof(UnityEngine.Resources);
-            args = new Type[]{typeof(System.String)};
-            method = type.GetMethod("Load", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Load_0);
-
-
-        }
-
-
-        static StackObject* Load_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.String path = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = UnityEngine.Resources.Load(path);
-
-            object obj_result_of_this_method = result_of_this_method;
-            if(obj_result_of_this_method is CrossBindingAdaptorType)
-            {    
-                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
-            }
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-
-
-    }
-}

+ 0 - 14
Unity/Hotfix/Module/Config/ConfigHelper.cs

@@ -19,20 +19,6 @@ namespace ETHotfix
 				throw new Exception($"load config file fail, key: {key}", e);
 			}
 		}
-		
-		public static string GetGlobal()
-		{
-			try
-			{
-				GameObject config = (GameObject)Resources.Load("KV");
-				string configStr = config.Get<TextAsset>("GlobalProto").text;
-				return configStr;
-			}
-			catch (Exception e)
-			{
-				throw new Exception($"load global config file fail", e);
-			}
-		}
 
 		public static T ToObject<T>(string str)
 		{

+ 9 - 12
Unity/Unity.csproj

@@ -12,15 +12,12 @@
     <ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
     <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
     <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
-    <TargetFrameworkProfile>
-    </TargetFrameworkProfile>
-    <CompilerResponseFile>
-    </CompilerResponseFile>
+    <TargetFrameworkProfile></TargetFrameworkProfile>
+    <CompilerResponseFile></CompilerResponseFile>
     <UnityProjectType>Game:1</UnityProjectType>
     <UnityBuildTarget>StandaloneWindows:5</UnityBuildTarget>
     <UnityVersion>2017.1.1p4</UnityVersion>
-    <RootNamespace>
-    </RootNamespace>
+    <RootNamespace></RootNamespace>
     <LangVersion>6</LangVersion>
   </PropertyGroup>
   <PropertyGroup>
@@ -156,11 +153,11 @@
     <Compile Include="Assets\Scripts\Base\Math\VLine.cs" />
     <Compile Include="Assets\Scripts\Base\Math\VRect.cs" />
     <Compile Include="Assets\Scripts\Base\MultiMap.cs" />
-    <Compile Include="Assets\Scripts\Base\Object\ComponentWithIdAttribute.cs" />
-    <Compile Include="Assets\Scripts\Base\Object\ComponentWithId.cs" />
     <Compile Include="Assets\Scripts\Base\Object\Component.cs" />
     <Compile Include="Assets\Scripts\Base\Object\ComponentAttribute.cs" />
     <Compile Include="Assets\Scripts\Base\Object\ComponentFactory.cs" />
+    <Compile Include="Assets\Scripts\Base\Object\ComponentWithId.cs" />
+    <Compile Include="Assets\Scripts\Base\Object\ComponentWithIdAttribute.cs" />
     <Compile Include="Assets\Scripts\Base\Object\Entity.cs" />
     <Compile Include="Assets\Scripts\Base\Object\EntityAttribute.cs" />
     <Compile Include="Assets\Scripts\Base\Object\EntityEventAttribute.cs" />
@@ -168,8 +165,8 @@
     <Compile Include="Assets\Scripts\Base\Object\EventProxy.cs" />
     <Compile Include="Assets\Scripts\Base\Object\EventSystem.cs" />
     <Compile Include="Assets\Scripts\Base\Object\IAwakeSystem.cs" />
-    <Compile Include="Assets\Scripts\Base\Object\ILateUpdateSystem.cs" />
     <Compile Include="Assets\Scripts\Base\Object\IDestroySystem.cs" />
+    <Compile Include="Assets\Scripts\Base\Object\ILateUpdateSystem.cs" />
     <Compile Include="Assets\Scripts\Base\Object\ILoadSystem.cs" />
     <Compile Include="Assets\Scripts\Base\Object\ISerializeToEntity.cs" />
     <Compile Include="Assets\Scripts\Base\Object\IStartSystem.cs" />
@@ -357,7 +354,7 @@
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\ETModel_CanvasConfig_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\ETModel_Component_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\ETModel_ComponentFactory_Binding.cs" />
-    <Compile Include="Assets\ThirdParty\ILRuntime\Generated\ETModel_Disposer_Binding.cs" />
+    <Compile Include="Assets\ThirdParty\ILRuntime\Generated\ETModel_ComponentWithId_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\ETModel_DoubleMap_2_UInt16_Type_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\ETModel_Entity_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\ETModel_EventProxy_Binding.cs" />
@@ -416,6 +413,7 @@
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\System_Collections_Generic_List_1_UnitInfo_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\System_Collections_Generic_List_1_UnitInfo_Binding_Enumerator__t.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\System_Collections_Generic_Queue_1_ILTypeInstance_Binding.cs" />
+    <Compile Include="Assets\ThirdParty\ILRuntime\Generated\System_Collections_Generic_Queue_1_Int64_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\System_Collections_IDictionary_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\System_Exception_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\System_IDisposable_Binding.cs" />
@@ -440,7 +438,6 @@
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\UnityEngine_Object_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\UnityEngine_Physics_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\UnityEngine_RaycastHit_Binding.cs" />
-    <Compile Include="Assets\ThirdParty\ILRuntime\Generated\UnityEngine_Resources_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\UnityEngine_TextAsset_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\UnityEngine_Transform_Binding.cs" />
     <Compile Include="Assets\ThirdParty\ILRuntime\Generated\UnityEngine_UI_Button_Binding.cs" />
@@ -785,4 +782,4 @@
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="GenerateTargetFrameworkMonikerAttribute" />
-</Project>
+</Project>