I believe that sometimes the simplest tool are often the most important, and often the most overlooked. Action or interaction we do the most in an editor should be the easiest and fastest. For that, the most basic tools should follow;

  • Your eyes stay on the target you are editing
  • No drag and drop and no mouse interaction if possible
  • If you know what you want, you shouldn't have to search for it



In this package, we would find two of the most basic tools possible, worked to be as efficient as possible.

Toolbox

The toolbox is a modal popup windows with a unique simple goal; give a list of choices to the user. It is invoked with the CTRL+E or CTRL+SHIFT+E shortcut, by any EditorWindow currently focused. It doesn't show up if the focused window does not implement the IModal interface.

The toolbox, following the "guidelines" has;

  • The search box is always selected and can always be edited. You never need to click on it.
  • The search box is able to remember the last search
  • An item on the list is always selected, unless there's no item on the list
  • Up/Down arrow scroll the selected item
  • Enter/Escape works for Ok/Cancel
  • Double clicking items is similar to Ok
  • Mouse scroll-wheels scrolls the list



While it is a very simple tool, a lot of work have been put into it to make it as quick and intuitive as possible. Creating GameObject or Component takes me a fraction of a second.

Ever wish you could list specific choices to the designers? A list that cannot be shown in the Object Picker? Maybe with a filter of only specific instances... Or simply a choices of different object to create. Or a list of nodes you can add to a panel. Or... well, actually anything that can be listed.

Creator

The Creator is a script hooked on the different SceneView. When you invoke the Toolbox with a SceneView focused, the Creator fills a list of item that can be created (CTRL+E) or added on a GameObject (CTRL+SHIFT+E). Adding components works on multi-selection.

By default, it lists all the Components that can be added to a GameObject, stock or those you created yourself (Ex.: MonoBehaviour). It also lists all the basic "types" (cube, capsule, plane, etc.). Finally, it list all the Prefab that are in any folder named "Creator", no matter its position in your Assets folder.

On top, you can add your own "creator" to the list. You want to have an option to create a Camera with 10 other scripts added? You can do it by extending the Creator class and adding a few lines. Nothing else needed, as the list is built by reflection.

The Creator is simply an - useful - example of what can be done with the Toolbox. In our projects, the toolbox is used all over the place, from our own custom Inspector, to our node-based event scripting tool, to any editor that need to list options to the user.