Whether applied edits are mergeable with previous edits. Starts out as
false
and is automatically set to true
by apply.
The target layer of this edit object.
Applies the changes made through this object to the target layer. This object can be reused to make further changes.
By default, the first time this method is called on a TileLayerEdit instance, it triggers a new undoable edit. Subsequent edits made through the same instance will merge with the previous step. To manually control whether the edit will be merged or not, set the mergeable property before calling apply.
Sets the tile at the given location, optionally specifying tile flags (any combination of Tile.FlippedHorizontally, Tile.FlippedVertically, Tile.FlippedAntiDiagonally and Tile.RotatedHexagonal120).
To remove a tile, set it to null
.
When the modifications are applied to the target layer, using apply, all locations which have been set retain a special flag. This flag is taken into account by TileMap.merge and Tool.preview, to enable erasing tiles and highlighting the erased area, respectively (since Tiled 1.10.2).
Generated using TypeDoc
This object enables modifying the tiles on a tile layer. Tile layers can't be modified directly for reasons of efficiency. The apply function needs to be called when you're done making changes.
An instance of this object is created by calling TileLayer.edit.