Support hot-reloading for a const HandleUntyped handle to an asset #3660
Labels
A-Assets
Load files from disk to use for things like images, models, and sounds
C-Feature
A new feature, making something new possible
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
What problem does this solve or what need does it fill?
I would like to make the core shaders hot-reloadable, behind a feature. So by default bevy would use
include_str!()
but it could optionally use something likeasset_server.load()
instead.What solution would you like?
I want to be able to associate something like:
with an asset loaded and watched by the
AssetServer
, so thePBR_SHADER_HANDLE
can be used as the handle, but so that the asset server file watcher will watch for changes and notifyPBR_SHADER_HANDLE
when the asset was changed.Additional context
HandleId
that can be created from theAssetPath
(via theAssetPathId
). This means that only the handle created from theAssetPath
can be notified.const
HandleUntyped
can also be associated with the asset, and will be notified of changes but this seems to be way more difficult than expected.asset_server.set_untracked()
to set theHandleUntyped
for the asset will not support hot-reloading because only theHandleId
calculated from theAssetPath
will be notified.The text was updated successfully, but these errors were encountered: