diff --git a/lvk/Pool.h b/lvk/Pool.h index 4324e9de31..e3722c8f95 100644 --- a/lvk/Pool.h +++ b/lvk/Pool.h @@ -68,6 +68,13 @@ class Pool { assert(handle.gen() == objects_[index].gen_); // accessing deleted object return &objects_[index].obj_; } + Handle getHandle(uint32_t index) const { + assert(index < objects_.size()); + if (index >= objects_.size()) + return {}; + + return Handle(index, objects_[index].gen_); + } Handle findObject(const ImplObjectType* obj) { if (!obj) return {};