Skip to content

Commit

Permalink
Qualify embedded_asset expansion with $crate:: (bevyengine#11961)
Browse files Browse the repository at this point in the history
# 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.
  • Loading branch information
coolreader18 authored and msvbg committed Feb 26, 2024
1 parent 088026c commit f24cc41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/io/embedded/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {{
Expand Down

0 comments on commit f24cc41

Please sign in to comment.