//public static void InitTraceback(IntPtr L) //{ // int oldTop = LuaDLL.lua_gettop(L); // LuaDLL.lua_getglobal(L, "debug"); // LuaDLL.lua_getfield(L, -1, "traceback"); // trace = LuaDLL.luaL_ref(L, LuaIndexes.LUA_REGISTRYINDEX); // LuaDLL.lua_settop(L, oldTop); //} public static byte[] DefaultLoader(string name) { byte[] buffer = null; string path = AssetPath.GetLuaPath(name); if (File.Exists(path)) { Debug.Log("¶ÁÈ¡luaÎļþ·¾¶:path" + path); buffer = File.ReadAllBytes(path); } else { Debug.Log("LoadAssetFromFile!!!"); TextAsset asset = LoadAssetFromFile <TextAsset>(name); buffer = asset.bytes; } return(buffer); }