diff --git a/KEngine b/KEngine index 8e4f669d..2e5b17a2 160000 --- a/KEngine +++ b/KEngine @@ -1 +1 @@ -Subproject commit 8e4f669d7085d9c244842e0df7441dd207f15620 +Subproject commit 2e5b17a23f46c7409193a3d0848d3a4ba1208899 diff --git a/KSFramework/Assets/Plugins/KSFramework/Modules/LuaModule/LuaModule.cs b/KSFramework/Assets/Plugins/KSFramework/Modules/LuaModule/LuaModule.cs index 47f2a5dd..abdc87e8 100644 --- a/KSFramework/Assets/Plugins/KSFramework/Modules/LuaModule/LuaModule.cs +++ b/KSFramework/Assets/Plugins/KSFramework/Modules/LuaModule/LuaModule.cs @@ -243,25 +243,7 @@ public IEnumerator Init() [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static public int ImportCSharpType(IntPtr l) { - try - { - string cls; - Helper.checkType(l, 1, out cls); - Type t = LuaObject.FindType(cls); - if (t == null) - { - return Helper.error(l, "Can't find {0} to create", cls); - } - - LuaClassObject co = new LuaClassObject(t); - LuaObject.pushObject(l,co); - Helper.pushValue(l, true); - return 2; - } - catch (Exception e) - { - return Helper.error(l, e); - } + return Helper.GetClass(l); } /// <summary> /// same as SLua default import diff --git a/slua b/slua index 697fafce..44f60862 160000 --- a/slua +++ b/slua @@ -1 +1 @@ -Subproject commit 697fafceda1e7aaf2da8d628ae07308815b5ef13 +Subproject commit 44f60862932b5b47d19cd93cd16888fcd1307c04