Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embedded_watcher doesn't work for crates outside of the main crate directory #14606

Closed
ricky26 opened this issue Aug 3, 2024 · 3 comments
Closed
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Duplicate This issue or PR already exists

Comments

@ricky26
Copy link
Contributor

ricky26 commented Aug 3, 2024

Bevy version

v0.14.1

What you did

  • Added a shader asset with embedded_asset!(app, "shaders/my_shader.wgsl");.
  • Enabled the bevy/asset_processing & bevy/embedded_watcher features.
  • Boot game.
  • Edited shader.

What went wrong

No reload is detected, but changes are taken into account when restarting (& building).

Additional information

It looks like this is caused by EmbeddedWatcher only watching the asset root directory (in my example below, crates/main/). In practice it should probably watch the workspace root and ideally be independently overridable without having to move assets/.

For completeness my project layout looks something like this:

crates/
  main/
    src/
    assets/
    Cargo.toml
  my_lib/
    src/
      shaders/
        my_shader.wgsl
    Cargo.toml
Cargo.toml
@ricky26 ricky26 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Aug 3, 2024
@TrialDragon TrialDragon added A-Assets Load files from disk to use for things like images, models, and sounds C-Usability A targeted quality-of-life change that makes Bevy easier to use and removed S-Needs-Triage This issue needs to be labelled labels Aug 4, 2024
@SludgePhD
Copy link
Contributor

I think this is the same as #10575

@ricky26
Copy link
Contributor Author

ricky26 commented Aug 4, 2024

Oh, you might well be right - I don't know why but I thought the embedded watcher wasn't that old, so I hadn't looked that far back when looking for dupes.

@BD103
Copy link
Member

BD103 commented Aug 7, 2024

If that's the case, I'm going to close this as a duplicate.

@BD103 BD103 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2024
@BD103 BD103 added the S-Duplicate This issue or PR already exists label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Duplicate This issue or PR already exists
Projects
None yet
Development

No branches or pull requests

4 participants