Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

API Overview

Where to look in the API, depending on what you want to do. Everything listed here is in the prelude (use bevy_ecs_tiled::prelude::*;), unless a full path is given.

Crate Layout

ModuleContent
assetTiled files loaded as Bevy assets: TiledMapAsset, TiledWorldAsset and Tiled IDs.
ecsEntities and components holding the Tiled data: the source of truth, which you can modify.
renderRendering derived from the ecs entities (render feature).
physicsPhysics colliders derived from the ecs entities (physics feature).
propertiesTiled custom properties.
debugDebug gizmos (debug feature).

I Want To…

I want to…Use
Load a mapAdd the TiledPlugin, spawn a TiledMap
Load a worldSpawn a TiledWorld (world feature)
Only spawn the maps of a world around the cameraTiledWorldStreaming
Find the spawned maps of a worldTiledWorldMaps system parameter, TiledWorldReference on the map entity
Reload a mapInsert RespawnTiledMap, or a new TiledMap
Place the mapTilemapAnchor and Transform on the map entity
Change the Z offset between layersTiledMapLayerZOffset
React when a map, layer or object is spawnedAn observer on TiledEvent<MapCreated> (or LayerCreated, ObjectCreated, …)
Find the map of a layer, tile or objectTiledMapReference, or TiledMapHelper
Iterate over the layers, tiles or objects of a mapTiledMapLayers, TiledMapTiles, TiledMapObjects system parameters
Find the tile at a given positionTiledTileLayerStorage on the layer entity
Know where a tile is displayedTiledMapHelper::tile_relative_position
Modify the map at runtimeSpawn, modify or despawn TiledTile and TiledObject entities (see the guide)
Read raw Tiled dataTiledMapAsset (map field, tileset(), tile(), layer(), object()) and the re-exported tiled crate
Read custom properties as they are in TiledTiledProperties
Get custom properties as my own componentsThe user_properties feature (see the guide)
Customize the tilemaps of a layerAn observer on TiledEvent<TilemapCreated>, TiledTilemap
Add parallax to layersTiledParallaxCamera on the camera
Add physics collidersTiledPhysicsPlugin and TiledPhysicsSettings (see the guide)
Split tiles colliders into chunksTiledColliderChunkSize
React when colliders are createdAn observer on TiledEvent<ColliderCreated>
Use another physics engineTiledPhysicsBackend and physics::geometry::collider_shapes
Run my systems before or after bevy_ecs_tiled onesSystem sets
See what is going onTiledDebugPluginGroup (see the guide)