C# Class FullInspector.Internal.TypeDropdownOptionsManager

Manages the options that are displayed to the user in the instance selection drop-down.
Show file Open project: jacobdufault/fullinspector Class Usage Examples

Public Methods

Method Description
GetDisplayOptionIndex ( object instance ) : int

Returns the index of the option that should be displayed (from GetDisplayOptions()) based on the current object instance.

GetDisplayOptions ( ) : UnityEngine.GUIContent[]

Returns an array of options that should be displayed.

GetIndexForType ( Type type ) : int
GetTypeForIndex ( int index, Type existingValue ) : Type
RemoveExtraneousOptions ( ) : void

Remove any options from the set of display options that are not permanently visible.

TypeDropdownOptionsManager ( Type baseType, bool allowUncreatableTypes ) : System

Setup the instance option manager for the given type.

UpdateObjectInstance ( object current, int currentIndex, int updatedIndex ) : object

Changes the instance of the given object, if necessary.

Private Methods

Method Description
GetOptionName ( FullInspector.Internal.fiReflectionUtility.DisplayedType type, bool addSkipCtorMessage ) : GUIContent

Method Details

GetDisplayOptionIndex() public method

Returns the index of the option that should be displayed (from GetDisplayOptions()) based on the current object instance.
public GetDisplayOptionIndex ( object instance ) : int
instance object
return int

GetDisplayOptions() public method

Returns an array of options that should be displayed.
public GetDisplayOptions ( ) : UnityEngine.GUIContent[]
return UnityEngine.GUIContent[]

GetIndexForType() public method

public GetIndexForType ( Type type ) : int
type System.Type
return int

GetTypeForIndex() public method

public GetTypeForIndex ( int index, Type existingValue ) : Type
index int
existingValue System.Type
return System.Type

RemoveExtraneousOptions() public method

Remove any options from the set of display options that are not permanently visible.
public RemoveExtraneousOptions ( ) : void
return void

TypeDropdownOptionsManager() public method

Setup the instance option manager for the given type.
public TypeDropdownOptionsManager ( Type baseType, bool allowUncreatableTypes ) : System
baseType System.Type
allowUncreatableTypes bool
return System

UpdateObjectInstance() public method

Changes the instance of the given object, if necessary.
public UpdateObjectInstance ( object current, int currentIndex, int updatedIndex ) : object
current object
currentIndex int
updatedIndex int
return object