the derive macro for AssetCollection trait assumes that bevy's World type among others is already in the scope
use bevy_asset_loader::prelude::AssetCollection;
#[derive(AssetCollection)] // cannot find World in this scope
struct Assets {
#[asset(path = "images/image.png")]
image: Handle<Image>,
}
but the error goes away when bevy prelude is imported.
use bevy::prelude::*;
use bevy_asset_loader::prelude::AssetCollection;
#[derive(AssetCollection)]
struct Assets {
#[asset(path = "images/image.png")]
image: Handle<Image>,
}
the derive macro for AssetCollection trait assumes that bevy's
World
type among others is already in the scopebut the error goes away when bevy prelude is imported.