Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get flecs::scoped_world by name #1027

Merged
merged 1 commit into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/flecs/addons/cpp/impl/world.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,8 @@ inline flecs::scoped_world world::scope() const {
return scoped_world(m_world, parent);
}

inline flecs::scoped_world world::scope(const char* name) const {
return scope(entity(name));
}

} // namespace flecs
2 changes: 2 additions & 0 deletions include/flecs/addons/cpp/world.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,8 @@ struct world {
template <typename T>
flecs::scoped_world scope() const;

flecs::scoped_world scope(const char* name) const;

/** Delete all entities with specified id. */
void delete_with(id_t the_id) const {
ecs_delete_with(m_world, the_id);
Expand Down