Skip to content

Expose watch_for_changes again #11490

Closed
@janhohenheim

Description

@janhohenheim

What problem does this solve or what need does it fill?

Bevy 0.12 removed AssetPlugin::watch_for_changes. We now have the ability to set the watcher activity via a feature or override it. If we don't override it, there is currently no way for a plugin to read whether we are in hot-reloading mode or not. My plugin however would like to know this, since I modify some resources on disk. If hot reloading is not enabled, my plugin needs to sync the in-memory resources as well, since they will not be automatically reloaded.

What solution would you like?

Expose a boolean somewhere that tells us whether hot reloading is on or off.

What alternative(s) have you considered?

Just don't. In my case, my plugin could just force the user to activate hot reloading on supported platforms.

Additional context

This came up while updating Yarn Slinger to Bevy 0.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AssetsLoad files from disk to use for things like images, models, and soundsC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions