I’m finally getting around to a few ideas on how to expand out my endless runner engine I’ve been working on for the last month. I decided to import the tile map editor from my last Unity 2D book and I’m using it to build out custom platforms, and other obstacles that will scroll by in my new endless runner game.
Here you can see I have the tile map editor running now in my project. I’ve selected a new custom tile map so I can create a platform. Here is what it ended up looking like:
Along with its properties which you can see from the inspector:
Once I created the new TileMapLayer instance, I saved it out as a prefab and attached it to an Object Pool which goes into a spawner and now I have instant platforms for my new game:
This tile map editor is incredibly versatile. The only modification I made to it, which I plan on updating my book, is the pixels to unit scale. I needed this since I’ve converted all the sprites to be a 1:1 ratio in the game space, making spacial math a little bit easier to figure out.