public static void luaL_unref_replace(IntPtr luaState, int registryIndex, int reference) { lock (m_Lock) { LuaHook.HookUnRef(luaState, reference); LuaDLL.luaL_unref(luaState, registryIndex, reference); } }