1. Home
  2. Docs
  3. Random Prefab Placer V2
  4. create and edit RPP prefab brushes

create and edit RPP prefab brushes

To create a new “RPP Brush” right click on any folder of your project window and use the create option.

Rename it if you like and click back to the “RPPBrushTool” in your hierarchy window. The newly generated brush should appear in the brushes list with a standard image.

Click on the new generated RPPBrush to select it and turn the tool to the static mode by clicking on the “Static Mode” button. Use the right mouse button in your scene view to move the placement circle of the tool where you would like it to be. This is important to see how changes to the brush will be affected later.

Click on the “Edit Brush” Button and a new inspector window will pop up with the settings for this selected brush.

Click on the Plus Symbol at the Prefabs List field and a new slot will appear.
Select the new Prefab Slot and the options for this prefab will appear underneath.

Assign a prefab or gamobject to the empty slot for the “Prefab Object”.

Chose the allowed layers for this prefab. Here you could define that this prefab is only allowed to be placed on objects with these layers. The standard value is Everything.

Try out your brush by clicking with the left mouse button inside the scene view, The assigned objects should now appear inside the placement circle. To delete these objects hold down the control-key on your keyboard.

Other settings for the selected prefab in your list are:

  • possibility
    There you define how likely it is that the script picks this object in your prefab list.

  • Scale Range
    here you can define which scale range is allowed for the script to randomly change the prefab to.
  • Locked Rotations
    Here you can select or deselect the axis the object is allowed to rotate around. Locked means selected. For plants mostly only the y-axis is free, for rocks mostly all axis are set to free.
  • max slope angle
    if your brush mode is set to “flat mode” only when your surface slope angle is less then the set val
    ue the prefabs are allowed to be placed. This comes handy when you work with grass on mountains for example.
  • use normals for rotation
    the script uses the normal direction of the surface to align the y-axis of the prefab to it.

you could add more prefabs to the brush by clicking on the plus icon of the prefabs list again.

If you are pleased with the brush settings, close the brush inspector window and switch back to “Draw Mode” on the RPPBrushTool.

Was this article helpful to you? Yes No

How can we help?