Skip to content
Discussion options

You must be logged in to vote

I'm not sure why you're using the window to move your sprite. I think that transform would move it just at the border of the screen.
You also need to spawn a camera.

You can look at the sprite example for how to spawn a sprite.

fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn(Camera2dBundle::default());
commands.spawn(SpriteBundle {
texture: asset_server.load("branding/icon.png"),
..default()
});
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bfg-coding
Comment options

Answer selected by bfg-coding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants