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

Add a getter for asset watching status on AssetServer #11578

Merged
merged 2 commits into from Jan 28, 2024

Conversation

Kanabenki
Copy link
Contributor

Objective

Solution

  • Add the corresponding getter. (also fixes some trailing whitespace).

A corresponding helper could also be added on the AssetPlugin struct (returning self.watch_for_changes_override.unwrap_or(cfg!(feature = "watch"))), but it seems it isn't a current practice to have actual methods on the plugin structs appart from the Plugin impl.


Changelog

Added

Added watching_for_changes getter on AssetServer.

@matiqo15 matiqo15 added A-Assets Load files from disk to use for things like images, models, and sounds C-Usability A simple quality-of-life change that makes Bevy easier to use labels Jan 28, 2024
Co-authored-by: Mateusz Wachowiak <mateusz_wachowiak@outlook.com>
@matiqo15 matiqo15 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jan 28, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 28, 2024
Merged via the queue into bevyengine:main with commit dad379c Jan 28, 2024
23 checks passed
tjamaan pushed a commit to tjamaan/bevy that referenced this pull request Feb 6, 2024
…1578)

# Objective

- Closes bevyengine#11490.
- Allow retrieving the current asset watch behavior from the
`AssetServer`.

## Solution

- Add the corresponding getter. (also fixes some trailing whitespace).

A corresponding helper could also be added on the `AssetPlugin` struct
(returning `self.watch_for_changes_override.unwrap_or(cfg!(feature =
"watch"))`), but it seems it isn't a current practice to have actual
methods on the plugin structs appart from the `Plugin` impl.

---

## Changelog

### Added

Added `watching_for_changes` getter on `AssetServer`.

---------

Co-authored-by: Mateusz Wachowiak <mateusz_wachowiak@outlook.com>
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-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose watch_for_changes again
4 participants