![pyxel edit release notes pyxel edit release notes](https://assetstorev1-prd-cdn.unity3d.com/key-image/a4431467-5600-4568-8f87-287823caeffd.jpg)
LuxeHelper.fillLayer(tilemap, background) Var tilemap = LuxeHelper.getTilemap('assets/tileset.png') Var pyxelMap = new PyxelMapImporter(Luxe.loadText("assets/map.xml", null, false).text) It will load three different layers and draw them on screen. Note that to load a luxe asset (the pyxel xml map) you would need new PyxelMapImporter(Luxe.loadText("assets/map.xml", null, false).text) here. LuxeHelper.fillLayer(tilemap, background) will add the appropriate tilelayer to the tilemap.var tilemap = LuxeHelper.getTilemap('assets/tileset.png') will return a Tilemap object.You can make use of pmi.LuxeHelper to get a Tilemap object and and fill the tilelayers easily. Var tilemapObjects = OpenflHelper.getTilemap(objects, tileset) Var tilemapWalls = OpenflHelper.getTilemap(walls, tileset) Var tilemapBackground = OpenflHelper.getTilemap(background, tileset) Var tileset = OpenflHelper.getTileset("assets/tileset.png") Var objects = pyxelMap.getDatasFromLayer("objects") Var walls = pyxelMap.getDatasFromLayer("walls") Var pyxelMap = new PyxelMapImporter(Assets.getText("assets/map.xml")) It will load three different layers and will draw them on screen.
![pyxel edit release notes pyxel edit release notes](https://www.noobloot.com/wp-content/uploads/2019/08/PyxelExportOptions.png)
Note that to load an openFL asset (the pyxel xml map) you would need new PyxelMapImporter(Assets.getText("assets/map.xml")) here. var tilemapBackground = OpenflHelper.getTilemap(background, tileset) will return a Tilemap object.var tileset = OpenflHelper.getTileset("assets/tileset.png") will return a Tileset object.You can make use of pmi.OpenflHelper to get a tilesheet object and a tile array easily. Var backgroundArray = pyxelMap.getLayerArray(background) Var pyxelMap = new PyxelMapImporter(sys.io.File.getContent("map.xml")) So let's say your collision red tile is at the rank 5, to check a collision you'll have to check if collisionArray = 5: This is not a 0/1 collision map.
![pyxel edit release notes pyxel edit release notes](https://pyxeledit.com/images/pixelTreeDetail.png)
IDs are assigned in order of appearance in your Pyxel Edit tileset window : If, for example, you name a PyxelEdit layer "collision" and dedicate a red tile for collisions, you can then extract that layer and check if there is a collision with a simple collisionArray. You can also use it to get a collision map. Var backgroundArray = pyxelMap.getLayerArray(background) will return an map array of type Array> allowing you to check the tile ID with backgroundArray. Layer.tiles is an Array where you can access fields : x, y, index, rot & flipX as it is in the XML, those datas are exposed in an cleaner way than the XML file and let you use some of the parameters i'm not using in the other methods.