r/Unity3D•
lajawi

A way to get Tilemap as 2D array in code?

Question

Is there a way to get a tilemap into code, to then have check stuff, change it, and apply it to the tilemap again?

In short, I want to make a small game where some blocks can fall and interact with other tiles. Thus my need to check for the custom "physics" and apply them every so often (currently fixed update set to run 5 times a second). Is there a way I can get the tilemap as a 2D array and manipulate it? I'd also need to know which tile is which, if possible.

Posted Nov 12, 2024, 8:16 PM UTC

112

Comments aren't archived yet

This post had 12 comments on Reddit. Comments for this period haven't been loaded into the archive yet.