Search Unity

Array based Object Placement Tool (Editor Extension)

Discussion in 'Made With Unity' started by xathos, Apr 8, 2011.

  1. xathos

    xathos

    Joined:
    Sep 24, 2009
    Posts:
    23
    This is a simple, but effective, tool for creating repeating formations of objects. For those familiar with Blender, this essentially implements the array modifier via an editor script: 'startTransform' is used to set the starting location, and the current object is used to modify this with each instantiation of the given object, 'obj' - up to a set count. Like blender, this is all rebuilt in realtime via OnSceneGUI(), and some pretty cool stuff can be done with this once arrays of arrays of objects are created... :D

    Anyways, I expect that this should be a welcome boon to anyone building platform, arcade, or any other type of game that uses repeated placements of pickups/obstacles and the like. More creative uses also probably exist - let me know if you make anything cool with it :D

    Edit: Note - Object handles must be set from 'center' to 'pivot' for this to work correctly.
     

    Attached Files:

    Last edited: Apr 8, 2011
  2. xathos

    xathos

    Joined:
    Sep 24, 2009
    Posts:
    23
    I just realized that I forgot to include the mesh I was using in the example scene xD
    Here's the fixed package (can't seem to edit post attachments for some reason).
     

    Attached Files:

  3. jujunosuke

    jujunosuke

    Joined:
    Apr 30, 2011
    Posts:
    190
    Dude, this look like a very nice initiative !
    I use very often the array modifier in bender. This can be useful in many way.

    Can the array modifier follow a curve path ?
    My thinking is to use this for a making a road.
     
  4. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Looks good but I can't run it in 3.4. And can you please have a c# version instead of boo