This issue does not exist to argue the merits of Resources as Components, for some of the rationale we refer to this HackMD (this really should've been an RFC, huh?). This issue exists to track the progress on implementation and to reference in code when it is only partially working. If there are steps you feel like should be added, or if there are problems with this approach, please let me know.
Implementation Plan
This is a tracking issue for the Resources as Components. This outline is roughly copied from #17485.
Issues
This issue does not exist to argue the merits of Resources as Components, for some of the rationale we refer to this HackMD (this really should've been an RFC, huh?). This issue exists to track the progress on implementation and to reference in code when it is only partially working. If there are steps you feel like should be added, or if there are problems with this approach, please let me know.
Implementation Plan
This is a tracking issue for the Resources as Components. This outline is roughly copied from #17485.
world.iter_entities()andworld._iter_entities_mut()as part of that effort Deprecateiter_entitiesanditer_entities_mut#20260.iter_entities()Reviveiter_entities()when you only have immutableWorldaccess ❤️🩹 #22864.#[derive(Resource)]macro Store Resources as components on singleton entities #20934.ReflectResourceStore Resources as components on singleton entities #20934.clear_allto also remove non-send dataclear_all()clears all (non-send data) #22911 .resourcesfromAccess, Remove resources fromAccess#22910 .bevy_sceneRemove resources from scenes #22968 .component_scope/resource_scopeimplementation.Issues
Resourceon top ofComponentcauses unexpected behaviour.world.spawn((ResourceA::default(), ResourceB::default())