Sign in

In this tutorial, we will learn how to create a TileMap in Unity using a custom mesh, define terrain types and blend terrains textures (edge smoothing). You can find the source on GitHub.

1. Creating a Map of Tiles (or a grid of points)

First let’s create a Tile class, for each tile we just want a position and a terrain type (we will just use an enum here)

public enum TerrainType { Water, Dirt, Grass, Rocks } public class Tile { public TerrainType terrainType; public Vector2Int position; public Map map; // We will create the map class just after this. public Tile(Vector2Int position, TerrainType terrainType, Map map) { this.position =…

Florian

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store