I'm not sure without writing tons of if statements how to detect when to replace the tile with a corner/side piece etc. I've thought about looping over it again with a SmoothMap() method, checking every tiles neighbours and seeing if they are a different tile from itself. I have managed to create a 1000*1000 randomly generated map with 'center' tiles of dirt/grass/water using your MeshRenderer system & UV00/UV11 to select sprites. but it seems very difficult to involve smooth edges. Right click on the Grid object in the scene and choose 2D Object -> Tilemap. Įdit: Would I be saving myself a lot of hassle using the Unity 2d RuleTiles? I was hoping I could make use of the MeshRenderer system you have going. The purpose of the engine is to simulate the laws of physics, in particular. maybe if I could draw/save some chunks and have them spawn randomly. Somehow 'saving' blocks of dirt/grass as preset areas of dirt/grass? and just blopping them about? If that makes sense. My other idea was to generate entire tilemap of water, then run another pass over the same tilemap changing 'chunks' of it to grass / dirt sections. So your saying one tilemap per type (water, dirt, grass) etc, have it draw the water first (entire map covered in water?), then next tilemap draws dirt and can detect when its placing the last tile on x/y axis (the edge/corner tiles) and place edge sprites accordingly? How/where/when would I detect this? xD
If there are multiple Tiles, the Cell Size. See in Glossary and based on the size of the Sprite used to create the Tile Assets. To use a different scale, set the Scale Factor in the Import Settings when importing Assets. Unitys 2D Tilemap System creates a great opportunity for aspiring indie. It doesn't need to be massively random just different enough. The Cell Size is automatically set in Unity units The unit size used in Unity Projects. To give you an idea of what I'm trying to achieve, its a top down game that I would like to randomly generate maps for (on initially loading your game, so doesn't have to be super quick). Nh vy, qua bài hng dn này, mình hi vng các bn có th t to cho mình các map game vi công c Tilemap c Unity cung cp, phiên bn mình s dng là phiên bn trên Unity 2018.3.3 Tilemap ã hoàn thin, nu các bn s dng nhng phiên bn c hn nh 2017. Monkey Thanks so much for your responses really giving me food for thought.