Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

I am getting so close to being able to port my existing game over to this amazing dungeon generator now. 

One issue I am having.

the dungeon generator creats a Generated Level at runtime but all of the tilemaps are on the default Unity Layer. I am using A* pathfinding which needs everything on separate layers. 

where can I make an edit to place the different tilemaps onto different layers?


many thanks

If you want to customize the output of the generator, the best way to do so is with a custom post-processing logic. You’ll have to implement the Run method which will be called after a level is generated. This method receives an instance of the GeneratedLevel class on which you can call the GetSharedTilemaps() method to get all the tilemaps from the level. When you have the tilemaps, you can find the ones that need a different layer and change that layer.

Let me know if that helps.

   level.GetSharedTilemaps().Find(x => x.name == "Walls").gameObject.layer = 17;


great.... thank you