NGUI: Next-Gen UI kit  3.7.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
ComponentSelector Class Reference

EditorGUILayout.ObjectField doesn't support custom components, so a custom wizard saves the day. Unfortunately this tool only shows components that are being used by the scene, so it's a "recently used" selection tool. More...

Inheritance diagram for ComponentSelector:

Public Member Functions

delegate void OnSelectionCallback (Object obj)
 

Static Public Member Functions

static void Draw< T > (string buttonName, T obj, OnSelectionCallback cb, bool editButton, params GUILayoutOption[] options)
 Draw a button + object selection combo filtering specified types. More...
 
static void Draw< T > (T obj, OnSelectionCallback cb, bool editButton, params GUILayoutOption[] options)
 Draw a button + object selection combo filtering specified types. More...
 
static void Show< T > (OnSelectionCallback cb)
 Show the selection wizard. More...
 
static void Show< T > (OnSelectionCallback cb, string[] extensions)
 Show the selection wizard. More...
 

Detailed Description

EditorGUILayout.ObjectField doesn't support custom components, so a custom wizard saves the day. Unfortunately this tool only shows components that are being used by the scene, so it's a "recently used" selection tool.

Member Function Documentation

static void ComponentSelector.Draw< T > ( string  buttonName,
obj,
OnSelectionCallback  cb,
bool  editButton,
params GUILayoutOption[]  options 
)
static

Draw a button + object selection combo filtering specified types.

Type Constraints
T :Object 
static void ComponentSelector.Draw< T > ( obj,
OnSelectionCallback  cb,
bool  editButton,
params GUILayoutOption[]  options 
)
static

Draw a button + object selection combo filtering specified types.

Type Constraints
T :Object 
delegate void ComponentSelector.OnSelectionCallback ( Object  obj)
static void ComponentSelector.Show< T > ( OnSelectionCallback  cb)
static

Show the selection wizard.

Type Constraints
T :Object 
static void ComponentSelector.Show< T > ( OnSelectionCallback  cb,
string[]  extensions 
)
static

Show the selection wizard.

Type Constraints
T :Object 

The documentation for this class was generated from the following file: