EdgeAlignerTool

Article Original Author: Dreamblur

EdgeAlignerToolEditorWindow.cs v.1.0 Original Script Author: Dreamblur

Description
EdgeAlignerTool is a tool which aligns one or more edges of the AABB of a selected game object to those of the AABB of another selected game object. It is similar to the Align tool found in 3ds Max.

Usage
Place the EdgeAlignerToolEditorWindow script in your project's Editor folder. A new sub-menu named Specialized Tools will appear in Unity's menu bar. The Edge Aligner Tool may be accessed from within this sub-menu.

Functionality
This tool aligns a point in the AABB of one game object with a point in the AABB of another game object. Grouped objects (parented game objects) can be aligned and be aligned with. In such cases, the AABB of the group is derived from the combined AABB of the parent object and all its children.

Limitation

 * There must be at least one skinned mesh renderer or mesh renderer attached to the selected game objects (or any of their children).
 * There cannot be both a skinned mesh renderer and a mesh renderer attached to the same game object among the selected game objects.
 * A selected game object cannot be a prefab -- an instance of a prefab is accepted.