Closed mxyf closed 1 month ago
LuaAPI.lua_pushvalue(L, idx); int reference = LuaAPI.luaL_ref(L); LuaAPI.lua_pushvalue(L, idx); LuaAPI.lua_pushnumber(L, reference); LuaAPI.lua_rawset(L, LuaIndexes.LUA_REGISTRYINDEX); 这里前两行应该已经将idx的东西放到了注册表吧?为什么还要手动再设置一遍呢,谢谢!
LuaAPI.lua_pushvalue(L, idx); int reference = LuaAPI.luaL_ref(L); LuaAPI.lua_pushvalue(L, idx); LuaAPI.lua_pushnumber(L, reference); LuaAPI.lua_rawset(L, LuaIndexes.LUA_REGISTRYINDEX); 这里前两行应该已经将idx的东西放到了注册表吧?为什么还要手动再设置一遍呢,谢谢!