Skip to content

Deprecate bundles in favor of Required Components #597

@Johardt

Description

@Johardt

As of Bevy 0.15, Bundles were deprecated in Bevy with Required Components replacing them. This plugin should follow suit. This would mean replacing Bundles like this:

#[derive(Bundle, Debug, Default, Clone)]
pub struct StandardTilemapBundle {
    pub grid_size: TilemapGridSize,
    pub map_type: TilemapType,
    pub size: TilemapSize,
    pub spacing: TilemapSpacing,
    pub storage: TileStorage,
    pub texture: TilemapTexture,
    pub tile_size: TilemapTileSize,
    pub transform: Transform,
    pub global_transform: GlobalTransform,
    pub render_settings: TilemapRenderSettings,
    /// User indication of whether an entity is visible
    pub visibility: Visibility,
    /// Algorithmically-computed indication of whether an entity is visible and should be extracted
    /// for rendering
    pub inherited_visibility: InheritedVisibility,
    pub view_visibility: ViewVisibility,
    /// User indication of whether tilemap should be frustum culled.
    pub frustum_culling: FrustumCulling,
    pub sync: SyncToRenderWorld,
}

With something like this:

#[derive(Component, Debug, Default, Clone)]
#[require(
    TilemapGridSize, 
    TilemapType, 
    TilemapSize, 
    TilemapSpacing, 
    TileStorage, 
    TilemapTexture, 
    TilemapTileSize, 
    Transform, 
    GlobalTransform, 
    TilemapRenderSettings, 
    Visibility, 
    InheritedVisibility, 
    ViewVisibility, 
    FrustrumCulling, 
    SyncToRenderWorld)]
pub struct StandardTilemap;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions