-
-
Couldn't load subscription status.
- Fork 4.2k
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 soundsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with BevyM-Migration-GuideA breaking change to Bevy's public API that needs to be noted in a migration guideA breaking change to Bevy's public API that needs to be noted in a migration guide
Description
How can Bevy's documentation be improved?
This conversion is used a lot in bevy_asset and can be mimicked by users. Unfortunately this can be used drop a strong handle, thus the associated asset. For example
fn asset_command(mut commands: Commands, asset: impl Into<AssetId<T>>) {
commands.add(MyCommand(asset.into()))
}
This may drop the asset before the command is applied, leading to hard to find bugs.
I think either document this or provide a better trait.
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-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with BevyM-Migration-GuideA breaking change to Bevy's public API that needs to be noted in a migration guideA breaking change to Bevy's public API that needs to be noted in a migration guide