Imagine I've crated an entity with transform:
let entity = world.create_entity().with(Transform::default());
How do I get its transform later having entity instance? E.g. (pseudo code):
let transform = entity.get_associated::<Transform>();
Worked for me:
let transform = world.read_storage::<Transform>().get(entity);
It also can be write_storage.
write_storage
Worked for me:
It also can be
write_storage
.