Adding component to an entity without registry ? #1030
Closed
rudiHammad
started this conversation in
General
Replies: 1 comment
-
I believe a handle is what you're looking for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I just started using Entt today, this a very basic question but I was wondering it adding components to entities are only done through the registry. For instance, can we do something like this (adding directly the component to an entity)
like playerEntity.emplace<TransformComponent>(std::vec2(), ...);
instead of
registry.emplace<TransformComponent>(playerEntity,
ax::Vec2(10, 20));`I am asking because I recently finished an ECS course were we learned how to implement our own ECS, and we had a registry class as well that did exactly what Entt does, and then we wrapped the Entity class to be able to directly emplace the component.
thx
Beta Was this translation helpful? Give feedback.
All reactions