Prefab brush in Unity

Daniel Kirwan
2 min readAug 26, 2021

--

Objective: Create a prefab brush in Unity for painting a collectible

With 2D tilemap games it can be tedious to continually add new prefabs to the level and position them where you want. By using the prefab brush that is available by installing the Unity 2D extras from GitHub you can make your job a lot easier.

Once you have the 2D extras imported into your project go ahead and prefab the object that you want to be able to brush into your scene.

Now, in your project folder right-click-> 2D-> Brushes-> Prefab brush. This will create an asset in your assets folder.

Now, click on the created asset and drag in the prefab you made earlier.

Once the prefab is inserted you are now ready to start brushing your prefab into your scene. But you need to change the brush you’re using first. In your tile palette window, at the bottom of this, you will see the words Default Brush. Click there and select the brush you made, it will have the same name as the prefab brush asset you created.

Now, you’re ready to paint away.

And that is it for creating a prefab brush to use in a 2D tilemap game in Unity.

--

--

Daniel Kirwan
Daniel Kirwan

Responses (1)