Luca Pierabella
Menu

About

Object Duplicator

· Original project page

The Obj Duplicator window in the Unity editor
FIG 1 Full size

Often, when I have no special task I try to learn new skills, this tool goes back to the beginning of my experience with Unity. I found somewhere in the web a tutorial to write a tool to replace the objects, what is below is the result of this tutorial with the addition of a part of the subjective characteristics. This tool examines, in particular, a number of selected objects and replaces them with an array object, leaving the possibility to choose whether to copy all or selected attributes

Three cubes in a Unity scene and the selected cube that will replace them
FIG 2 Full size
The same scene after the replacement: four identical cubes
FIG 3 Full size

Another of the features added later to the tool is the ability to copy a certain object parametrically, specifying the number of instances to be duplicated in a direction and with an optional offset.

The Obj Duplicator window and a row of five cubes duplicated with an offset
FIG 4 Full size