Game Objects Painter

Buy now on Asset Store!

Game Objects Painter is a tool that allows you to paint prefabs all over your scenes. Prefabs are placed more or less randomly, depending on the values of input parameters that the tool exposes.

The requirement for painting is that objects that prefabs are to be painted on must have collider components attached.

Take a look at the YouTube demonstration:


Basic Concepts

To paint objects you must first create a GameObjectsPainter component instance within some given game object. This game object will be the parent for all objects painted using it.

Painting is achieved by pressing the left mouse button (LMB).

During painting the objects are not actually created in the scene. They are created once you release LMB.


  • Game Objects Count – length of list of prefabs that will randomly be placed.
  • Paint / Erase – switches between painting and erasing modes.
  • Name Filter – this phrase must be contained in the name of objects that are to be painted on. When no text is given this filter is off.
  • Layer Filter – objects to be painted on must be on the layer given by this field.
  • Align with Normal – when ths option is on, all painted objects will be oriented according to the normal of the points they are placed at.
  • Alignment Vector – when Align with Normal is off, this vector will determine the orientation of painted objects.
  • Height Threshold – the brush paints by projecting prefabs “down” from the brush plane. This field virtually shifts the brush up so that painting can affect objects above the brush.
  • Step – the smaller this value the smaller the distances between painted objects and thus more of them.
  • Inner Radius / Outer Radius – the further from the center of the brush the less likely new objects are painted. However, objects within Inner Radius are painted no matter the distance. Obviously, objects outside of Outer Radius are not painted at all.
  • Probability – it is not only the distance from the brush’s center that determines the likeliness of painting but also this parameter. The distance likeliness is multiplied by this parameter to determine the final probability. This roughly means that if this parameter is set to 0.5 then all objects within Inner Radius have 50% chance to be painted, in the mid between Inner Radius and Outer Radius the probability is 25% and so on.
  • Spacing – when pressing the LMB to paint, it would be undesirable for the painter to paint each frame. That would create a huge number of objects. That is where this parameter comes in. When one series of objects is painted, the brush must travel the distance determined by this parameter to be able to paint again.
  • Start Scale / Stop Scale – additional scale applied to each object. Start Scale is applied to each object within Inner Radius. Stop Scale is applied at the Outer Radius border. In between the scale is linearly interpolated.


A test level is at GameObjectsPainter/Assets/BlossomGames/GameObjectsPainter/Examples/Levels/test.unity.

Quick Tutorial

This quick tutorial will show you how to use Game Objects Painter step by step.

  • Load the test scene under GameObjectsPainter/Assets/BlossomGames/GameObjectsPainter/Examples/Levels/test.unity.
  • Select GameObjectsPainter object.
  • Move cursor around the scene while pressing LMB to paint some objects.
  • Experiment with parameters to see how they work.


Please note that the way the tool paints objects is hard-coded to a high degree. If you have any ideas on what parameters could be exposed to the user or what would make the tool more flexible but still easy to use, please let us know.