DropDownList

Author: rkite

Description
Creates a GUI Dropdown list that looks and works like the Hierarchy window in Unity, using a heirercy basied on the parent/child releastionship of the objects transforms.

Functionality
The script finds objects that start with whatever text is typed in the text field and updates the dropdown list to show only matching items. If the text field is blank it expands the whole list.



Usage
1.) Attach this script to a GameObject in your project.

2.) Set the root to the GameObject that is the top of your hierarchy.

3.) Set dropSkin to a GUISkin with 3 Custom Styles for each level of your Hierarchy. Each set of three Custom Styles should have the Content Offset adjusted for the level of the hierachy. Its kind of a pain but I have not found a better way to do this yet. If your hieracrhy has 10 levels you need 30 custom styles to give you the proper indented look.

4.) Give the Custom Styles the approprate texture for Normal, Hover and Active.