2D Tile Maps Expandable editable

Hello :slight_smile: i want to use tiles on grids in my games i did some research before but i didnt found anything what helped me out.

(Currently i use an empty Map object with lots of prefabs inside wich i cant remove replace ingame and hard to edit too)

I want to edit the map ingame throght scripts (destructable) and in the editor (level design) ive read something about voxels but that seems to be 3d.

The tiles should be gameobjects and scriptable for interaction with certain things.

Is there some relatively โ€œsimpleโ€ way to introduce it in a game?

Thank you for help

I guess this Map object you are referring to is a custom class you made? A tile map is just an array (generally a 2d grid but can be 3d of course). If you update your Map object to have an array and populate the array with the corresponding GameObjects from your prefabs you will gain dynamic control over them. Being able to add and remove GameObjects at runtime.

If you show some screenshots of what you are currently doing and show the code for this Map object you mentioned that will help a lot to get a better answer.

My map hasnt scripts at all its very unprofessional ive made a sprite with 2d colliders and placed them