Skip to content

Retrieving multiple (mutable) components for an entity in 1 go without a lambda #1703

@BasBuur

Description

@BasBuur

Describe the problem you are trying to solve.
Entt allows retrieving n components in 1 go with the following syntax:

auto & [pos, vel] = registry.get<Position, Velocity>(entity);

This is a really nice feature and it would be great if it could be added to flecs. I know flecs allows retrieving multiple components with a lambda but I prefer the components in my local scope without a lambda.

Bonus points if we could get a mutable version as well. For example entity.get_all<Position, Velocity>() and entity.get_all_mut<Position, Velocity>().

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions