Qualify embedded_asset expansion with $crate:: (#11961)

# Objective

Right now, if you call `embedded_asset` with 2 arguments as a qualified
path it doesn't work (`bevy::asset::embedded_asset!(app, "foo.wgsl")` ->
"cannot find macro `embedded_asset` in this scope")

## Solution

Use `$crate::` in expansion for 2-arg case.
This commit is contained in:
Noa 2024-02-18 15:52:32 -06:00 committed by GitHub
parent efda05d11e
commit cb5ff51d1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -219,7 +219,7 @@ pub fn _embedded_asset_path(
#[macro_export]
macro_rules! embedded_asset {
($app: ident, $path: expr) => {{
embedded_asset!($app, "src", $path)
$crate::embedded_asset!($app, "src", $path)
}};
($app: ident, $source_path: expr, $path: expr) => {{