It states that Components do not get attached to Entities, but Entities do get attached to Components. Is there a way to get Entity from/by a Component?
Nope, a component is just a blob of Data.
An entity just two numbers: a key into a table of pointers, where the pointer points to the “actual” storage location of all of it’s components, and a Version number that’s bumped when it’s destroyed, used to check if a specific entity is still alive or not.
Unless the Component in question has it’s owning Entity value as its (or one of its) data values, there’s no way to do a reverse lookup.
Oh, that is sad. Thank you!
A component is not attached to an Entity, but the component knows the Entity-ID, It is technically possible
How would I get it then?
Entity is not attached to a component but it is (implicitly) attached to a set of components. If you’re processing a ComponentGroup you can get the corresponding Entity with EntityArray. Which you can either inject or GetEntityArray if you have the ComponentGroup.