There was an error while loading. Please reload this page.
Answer: Only join the required ones plus the Entities and use Storage::get to retrieve the optional ones.
Entities
Storage::get
type SystemData = (Entities<'a>, ReadStorage<'a, Required>, ReadStorage<'a, Optional>); fn run(&mut self, (ent, req, opt): Self::SystemData) { for (e, req) in (&*ent, &req).join() { let opt: Option<&Optional> = opt.get(e); // Use components here } }