Crates.io | bevy_remote_asset |
lib.rs | bevy_remote_asset |
version | 0.1.1 |
source | src |
created_at | 2023-08-29 10:17:23.079989 |
updated_at | 2023-08-30 02:28:04.677538 |
description | A Bevy plugin to load asset from web |
homepage | |
repository | https://github.com/foxzool/bevy_remote_asset |
max_upload_size | |
id | 957866 |
size | 91,079 |
A Bevy plugin to load asset from web. It is based on the ehttp
use bevy::prelude::*;
use bevy_remote_asset::RemoteAssetPlugin;
fn main() {
App::new()
.add_plugins(RemoteAssetPlugin)
.add_plugins(DefaultPlugins)
.add_systems(Startup, setup)
.run()
}
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn(Camera2dBundle::default());
commands.spawn(SpriteBundle {
texture: asset_server
.load("https://seeklogo.com/images/B/bevy-engine-logo-25F6DD58BF-seeklogo.com.png"),
..default()
});
}