Hello, everyone! I have a tilemap(screenshot below) for my terrain.
I want to randomly build on terrain some “prefabed” constructions, for example just a filled rect of special kind of block, and then palce some gameObjects in there.
What I should to use, to easily make these prefabs and place them on tilemap, using script? I tried to do this only using code, but it will take too much time, to build more prefabs.
Tiles are actually not GameObjects or MonoBehaviours but rather just assets of type TileBase. They actually derive from ScriptableObjects.
You can make these assets on disk, or make them at runtime and modify your TileMap with fresh tiles.
You can also make your own classes derived from TileBase and code up more complicated behavior for a given tile. Check out the docs and maybe look for some tutorials on it.