-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
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 soundsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useX-ControversialThere is active debate or serious implications around merging this PRThere is active debate or serious implications around merging this PR
Description
What problem does this solve or, what need does it fill?
Handle currently requires Default
to be implemented, which reduces type safety because for many Assets
no default makes sense. Removing this requirement would also partially solve #1201, because when creating Text
and filling out the values with ..Default::default()
style.font
will be set to an invalid font Handle and fail to render.
What solution would you like?
The removal of the requirement that all Handles
have to implement Default
. The reason this requirement exists is because Handle
derives Reflect
.
What alternative(s) have you considered?
Runtime errors for default handle values where Default
is invalid, but this delays the problem feedback and increases iteration time compared to getting the error at compile time.
Davier
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 soundsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useX-ControversialThere is active debate or serious implications around merging this PRThere is active debate or serious implications around merging this PR
Type
Projects
Status
Concrete and Controversial