bevy/crates/bevy_asset/src
Yutao Yuan aabc47f290 Make public macros more robust with $crate (#4655)
# Objective

We have some macros that are public but only used internally for now. They fail on user's code due to the use of crate names like `bevy_utils`, while the user only has `bevy::utils`. There are two affected macros.

- `bevy_utils::define_label`: it may be useful in user's code for defining custom kinds of label traits (this is why I made this PR).
- `bevy_asset::load_internal_asset`: not useful currently due to limitations of the debug asset server, but this may change in the future.

## Solution

We can make them work by using `$crate` instead of names of their own crates, which can refer to the macro's defining crate regardless of the user's setup. Even though our objective is rather low-priority here, the solution adds no maintenance cost so it is still worthwhile.
2022-05-06 19:29:45 +00:00
..
diagnostic Down with the system! (#2496) 2021-07-27 23:42:36 +00:00
io Add file metadata to AssetIo (#2123) 2022-05-02 18:04:47 +00:00
asset_server.rs Add file metadata to AssetIo (#2123) 2022-05-02 18:04:47 +00:00
assets.rs Make public macros more robust with $crate (#4655) 2022-05-06 19:29:45 +00:00
debug_asset_server.rs remove Events from bevy_app, they now live in bevy_ecs (#4066) 2022-03-01 19:33:56 +00:00
filesystem_watcher.rs Bump notify to 5.0.0-pre.11 (#2564) 2021-07-29 23:56:16 +00:00
handle.rs small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
info.rs [assets] set LoadState properly and more testing! (#2226) 2021-06-08 02:46:44 +00:00
lib.rs Make get_resource (and friends) infallible (#4047) 2022-02-27 22:37:18 +00:00
loader.rs Add file metadata to AssetIo (#2123) 2022-05-02 18:04:47 +00:00
path.rs Allow String and &String as Id for AssetServer.get_handle(id) (#3280) 2021-12-09 22:40:15 +00:00