Add tiles with script

So, this feels like it should be a piece of cake, but I just cannot find how to do it…

My end goal is to make a procedurally generated map, sort of like Sebastian Lague’s Procedural Terrain Generation - YouTube, but 2D, and most importantly, with tiles (preferably isometric, but I can probably figure that part out myself). (The ultimate end goal is to achieve a world generation akin to that of Age of Empires, or Life is Feudal: Forest Village)

So, in order to procedurally generate these tiles, I must add tiles to a tilemap through a script (which will also hold the noise values, etc.), correct? Yet I cannot find the function for how to simply “add tiles at coordinate” to a tilemap, nor how to set it up and connect the necessary parts.

So to put it simply, how do I use a script to add a tile to a tilemap?


and many more