dasolz.blogg.se

Unity 2019 tilemap
Unity 2019 tilemap












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. Į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. 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.

unity 2019 tilemap

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

unity 2019 tilemap

It doesn't need to be massively random just different enough.

unity 2019 tilemap

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).

Monkey Thanks so much for your responses really giving me food for thought. The most similar GameObject structure to the ‘Grid <-> Tilemap’ setup is Unity’s UI System where the Canvas parent GameObject acts as a layout.












Unity 2019 tilemap