Skip to content

Commit

Permalink
#1027 get scope from name
Browse files Browse the repository at this point in the history
  • Loading branch information
alexv-ds committed Aug 20, 2023
1 parent 1d9f890 commit 1665302
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
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

0 comments on commit 1665302

Please sign in to comment.