Tile Map Editor + Object Pooling

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.

Subscribe To My Mailing List

Want to learn how to make a game? Not sure where to start? Even if you are a seasoned game maker there is still a lot you can learn from my mailing list. I'll be covering tips and tricks for how to build, release and market games each month.

Simply sign up for my mailing list and also get access to a 50% off discount code for my eBooks and other content. I promise to not spam your inbox!

Join Now