In the built in Tile Palette tilemap editor, you can choose a GameObject brush to set custom tile GameObjects. How would I be able to set a gameObject onto a tile through a script?. There is no function for this in the tilemap class, or at least the documentation does not mention anything, so how would this work?


I have a few prefabs that I would like to use the "gameObject brush" on; I also have a tilemap ready to place the tiles.


1 Answer 1


You can utilize the Prefab Brush tool for your purpose. There are various tutorials available on YouTube that can guide you through its usage.

By default, selecting the prefab brush from the menu can be challenging. Therefore, I developed a tool to simplify the visualization process. Since I couldn't use the TileMap Palette, I created a custom palette to achieve the desired results.

You can find the Prefab Painter tool on GitHub at the following link: https://github.com/smkplus/prefab-painter. It provides a more intuitive approach to working with prefabs in your Unity projects.

In the provided link, you'll also find an image demonstrating the tool's interface: image

Additionally, there is a GIF showcasing the tool in action: 135707548-43bd5a32-6754-4434-bea6-8c02a6e8507e

Feel free to explore the Prefab Painter tool and experiment with its features to enhance your prefab workflow.

  • \$\begingroup\$ This is not useful, I am fully aware of that brush tool and it's uses, but I am looking for a way to place prefabs like this through a C# SCRIPT. \$\endgroup\$ Jun 26 at 20:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .