-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
API inconsistency with Handle as component or field of component #14124
Copy link
Copy link
Closed
Labels
A-AssetsLoad files from disk to use for things like images, models, and soundsLoad files from disk to use for things like images, models, and soundsA-Cross-CuttingImpacts the entire engineImpacts the entire engineA-ScenesComposing and serializing ECS objectsComposing and serializing ECS objectsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useS-Waiting-on-SMEThis is currently waiting for an SME to resolve something controversialThis is currently waiting for an SME to resolve something controversialX-BlessedHas a large architectural impact or tradeoffs, but the design has been endorsed by decision makersHas a large architectural impact or tradeoffs, but the design has been endorsed by decision makers
Milestone
Metadata
Metadata
Assignees
Labels
A-AssetsLoad files from disk to use for things like images, models, and soundsLoad files from disk to use for things like images, models, and soundsA-Cross-CuttingImpacts the entire engineImpacts the entire engineA-ScenesComposing and serializing ECS objectsComposing and serializing ECS objectsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useS-Waiting-on-SMEThis is currently waiting for an SME to resolve something controversialThis is currently waiting for an SME to resolve something controversialX-BlessedHas a large architectural impact or tradeoffs, but the design has been endorsed by decision makersHas a large architectural impact or tradeoffs, but the design has been endorsed by decision makers
Question
Should components with associated assets (e.g.
Sprite+Handle<Image>) include theirHandleas a field, or as a separate component on the same entity, or something else?Handle-as-field: May make certain generic systems impossible (see theasset_decompressionexample).Handle-as-component: May create ambiguity (seeEnvironmentMapLight).From the Discord discussion, this is blocked on Bevy scenes before a design decision can be made.
Status quo
Bevy's answer to this question is inconsistent (as of March 6th, 2024):