| Crates.io | bevy_full_asset_path |
| lib.rs | bevy_full_asset_path |
| version | 0.1.0 |
| created_at | 2025-06-17 22:27:25.86793+00 |
| updated_at | 2025-06-17 22:27:25.86793+00 |
| description | Allows reading the full asset path of an asset loaded from disk |
| homepage | |
| repository | https://github.com/janhohenheim/bevy_full_asset_path |
| max_upload_size | |
| id | 1716360 |
| size | 162,892 |
A tiny plugin that allows reading the full asset path of an asset loaded from disk
Add FullAssetPathPlugin after DefaultPlugins, then use the FullAssetPathProvider resource to retrieve full paths:
use bevy::prelude::*;
use bevy_full_asset_path::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(FullAssetPathPlugin::default())
.add_systems(Startup, setup)
.run();
}
fn setup(asset_server: Res<AssetServer>, full_path_provider: Res<FullAssetPathProvider>) {
let sprite: Handle<Image> = asset_server.load("bird/icon.png");
let asset_path = sprite.path().unwrap();
let full_path = full_path_provider.full_asset_path(asset_path).unwrap();
info!("Full asset path: {}", full_path.display());
}