remove circular dependency between bevy_sprite and bevy_image (#18379)
# Objective - #17219 introduced a circular dependency between bevy_image and bevy_sprite for documentation ## Solution - Remove the circular dependency - Simplify the doc example
This commit is contained in:
parent
6d6054116a
commit
ce392fade8
@ -79,7 +79,6 @@ half = { version = "2.4.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
bevy_ecs = { path = "../bevy_ecs", version = "0.16.0-dev" }
|
||||
bevy_sprite = { path = "../bevy_sprite", version = "0.16.0-dev" }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -173,12 +173,11 @@ impl<'a> TextureAtlasBuilder<'a> {
|
||||
/// # Usage
|
||||
///
|
||||
/// ```rust
|
||||
/// # use bevy_sprite::prelude::*;
|
||||
/// # use bevy_ecs::prelude::*;
|
||||
/// # use bevy_asset::*;
|
||||
/// # use bevy_image::prelude::*;
|
||||
///
|
||||
/// fn my_system(mut commands: Commands, mut textures: ResMut<Assets<Image>>, mut layouts: ResMut<Assets<TextureAtlasLayout>>) {
|
||||
/// fn my_system(mut textures: ResMut<Assets<Image>>, mut layouts: ResMut<Assets<TextureAtlasLayout>>) {
|
||||
/// // Declare your builder
|
||||
/// let mut builder = TextureAtlasBuilder::default();
|
||||
/// // Customize it
|
||||
@ -187,8 +186,6 @@ impl<'a> TextureAtlasBuilder<'a> {
|
||||
/// let (atlas_layout, atlas_sources, texture) = builder.build().unwrap();
|
||||
/// let texture = textures.add(texture);
|
||||
/// let layout = layouts.add(atlas_layout);
|
||||
/// // Spawn your sprite
|
||||
/// commands.spawn(Sprite::from_atlas_image(texture, TextureAtlas::from(layout)));
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user