r/Unity2D • u/Silent_Reputation596 • 3h ago
Question/Help How to turn each pixel on a colour map to a tile on a tile map?
I followed this tutorial: https://www.youtube.com/watch?v=RDQK1_SWFuc&list=PLFt_AvWsXl0eBW2EiBtl_sxmDtSgZBxB3&index=4 I just finished ep4 and the next episode goes into generating a mesh from the perlin noise. I want to make a 2d game and have a tileset already set up. What I want to know is how to transfer each pixel on the colour map to a corresponding tile in the tileset and then draw that on the tile map.
I've already defined what tile should be used for each terrain type.
public struct TerrainType
{
public string name;
public float height;
public Color colour;
public RuleTile tile;
}How do I then use each pixel on the colour map to place it's tile on a tilemap? This is the first time I've none proc gen so I have absolutely no idea: talk to me like I'm a complete beginner.



