Tanoda
Leap.Unity.CustomEditorBase< T > Class Template Reference
Inheritance diagram for Leap.Unity.CustomEditorBase< T >:
Leap.Unity.GraphicalRenderer.LeapGraphicEditorBase< T > Leap.Unity.Packaging.DefinitionBaseEditor< T >

Public Member Functions

override void OnInspectorGUI ()
 

Protected Member Functions

override void OnEnable ()
 
void dontShowScriptField ()
 
void specifyCustomDrawer (string propertyName, Action< SerializedProperty > propertyDrawer)
 Specify a callback to be used to draw a specific named property. Should be called in OnEnable. More...
 
void specifyCustomDecorator (string propertyName, Action< SerializedProperty > decoratorDrawer)
 Specify a callback to be used to draw a decorator for a specific named property. Should be called in OnEnable. More...
 
void specifyCustomPostDecorator (string propertyName, Action< SerializedProperty > decoratorDrawer)
 Specify a callback to be used to draw a decorator AFTER a specific named property. More...
 
void specifyConditionalDrawing (string conditionalName, params string[] dependantProperties)
 Specify a list of properties that should only be displayed if the conditional property has a value of true. Should be called in OnEnable. More...
 
void specifyConditionalDrawing (string enumName, int enumValue, params string[] dependantProperties)
 
void hideField (string propertyName)
 
void specifyConditionalDrawing (Func< bool > conditional, params string[] dependantProperties)
 
void deferProperty (string propertyName)
 Defer rendering of a property until the end of the inspector. Deferred properties are drawn in the REVERSE order they are deferred! NOT by the order they appear in the serialized object! More...
 
void addPropertyToFoldout (string propertyName, string foldoutName, bool foldoutStartOpen=false)
 Condition the drawing of a property based on the status of a foldout drop-down. More...
 
bool isInFoldout (string propertyName)
 Check whether a property is inside of a foldout drop-down. More...
 
void drawScriptField (bool disable=true)
 
virtual void OnEnable ()
 
bool validateProperty (string propertyName)
 

Protected Attributes

new T target
 
new T[] targets
 
Dictionary< string, Action< SerializedProperty > > _specifiedDrawers
 
Dictionary< string, List< Action< SerializedProperty > > > _specifiedDecorators
 
Dictionary< string, List< Action< SerializedProperty > > > _specifiedPostDecorators
 
Dictionary< string, List< Func< bool > > > _conditionalProperties
 
Dictionary< string, List< string > > _foldoutProperties
 
Dictionary< string, bool > _foldoutStates
 
List< string > _deferredProperties
 
bool _showScriptField = true
 
List< SerializedProperty > _modifiedProperties = new List<SerializedProperty>()
 

Detailed Description

Type Constraints
T :UnityEngine.Object 

Definition at line 17 of file CustomEditorBase.cs.

Member Function Documentation

◆ addPropertyToFoldout()

void Leap.Unity.CustomEditorBase< T >.addPropertyToFoldout ( string  propertyName,
string  foldoutName,
bool  foldoutStartOpen = false 
)
protected

Condition the drawing of a property based on the status of a foldout drop-down.

Definition at line 189 of file CustomEditorBase.cs.

◆ deferProperty()

void Leap.Unity.CustomEditorBase< T >.deferProperty ( string  propertyName)
protected

Defer rendering of a property until the end of the inspector. Deferred properties are drawn in the REVERSE order they are deferred! NOT by the order they appear in the serialized object!

Definition at line 176 of file CustomEditorBase.cs.

◆ dontShowScriptField()

void Leap.Unity.CustomEditorBase< T >.dontShowScriptField ( )
protected

Definition at line 47 of file CustomEditorBase.cs.

◆ drawScriptField()

void Leap.Unity.CustomEditorBase< T >.drawScriptField ( bool  disable = true)
protected

Definition at line 217 of file CustomEditorBase.cs.

◆ hideField()

void Leap.Unity.CustomEditorBase< T >.hideField ( string  propertyName)
protected

Definition at line 146 of file CustomEditorBase.cs.

◆ isInFoldout()

bool Leap.Unity.CustomEditorBase< T >.isInFoldout ( string  propertyName)
protected

Check whether a property is inside of a foldout drop-down.

Definition at line 206 of file CustomEditorBase.cs.

◆ OnEnable() [1/2]

override void Leap.Unity.CustomEditorBase< T >.OnEnable ( )
protected

Definition at line 21 of file CustomEditorBase.cs.

◆ OnEnable() [2/2]

◆ OnInspectorGUI()

override void Leap.Unity.CustomEditorBase< T >.OnInspectorGUI ( )

Definition at line 254 of file CustomEditorBase.cs.

◆ specifyConditionalDrawing() [1/3]

void Leap.Unity.CustomEditorBase< T >.specifyConditionalDrawing ( Func< bool >  conditional,
params string[]  dependantProperties 
)
protected

Definition at line 152 of file CustomEditorBase.cs.

◆ specifyConditionalDrawing() [2/3]

void Leap.Unity.CustomEditorBase< T >.specifyConditionalDrawing ( string  conditionalName,
params string[]  dependantProperties 
)
protected

Specify a list of properties that should only be displayed if the conditional property has a value of true. Should be called in OnEnable.

Parameters
conditionalName
dependantProperties

Definition at line 112 of file CustomEditorBase.cs.

◆ specifyConditionalDrawing() [3/3]

void Leap.Unity.CustomEditorBase< T >.specifyConditionalDrawing ( string  enumName,
int  enumValue,
params string[]  dependantProperties 
)
protected

Definition at line 129 of file CustomEditorBase.cs.

◆ specifyCustomDecorator()

void Leap.Unity.CustomEditorBase< T >.specifyCustomDecorator ( string  propertyName,
Action< SerializedProperty >  decoratorDrawer 
)
protected

Specify a callback to be used to draw a decorator for a specific named property. Should be called in OnEnable.

Definition at line 69 of file CustomEditorBase.cs.

◆ specifyCustomDrawer()

void Leap.Unity.CustomEditorBase< T >.specifyCustomDrawer ( string  propertyName,
Action< SerializedProperty >  propertyDrawer 
)
protected

Specify a callback to be used to draw a specific named property. Should be called in OnEnable.

Parameters
propertyName
propertyDrawer

Definition at line 56 of file CustomEditorBase.cs.

◆ specifyCustomPostDecorator()

void Leap.Unity.CustomEditorBase< T >.specifyCustomPostDecorator ( string  propertyName,
Action< SerializedProperty >  decoratorDrawer 
)
protected

Specify a callback to be used to draw a decorator AFTER a specific named property.

Should be called in OnEnable.

Definition at line 90 of file CustomEditorBase.cs.

◆ validateProperty()

bool Leap.Unity.CustomEditorBase< T >.validateProperty ( string  propertyName)
protected

Definition at line 242 of file CustomEditorBase.cs.

Member Data Documentation

◆ _conditionalProperties

Dictionary<string, List<Func<bool> > > Leap.Unity.CustomEditorBase< T >._conditionalProperties
protected

Definition at line 36 of file CustomEditorBase.cs.

◆ _deferredProperties

List<string > Leap.Unity.CustomEditorBase< T >._deferredProperties
protected

Definition at line 39 of file CustomEditorBase.cs.

◆ _foldoutProperties

Dictionary<string, List<string> > Leap.Unity.CustomEditorBase< T >._foldoutProperties
protected

Definition at line 37 of file CustomEditorBase.cs.

◆ _foldoutStates

Dictionary<string, bool> Leap.Unity.CustomEditorBase< T >._foldoutStates
protected

Definition at line 38 of file CustomEditorBase.cs.

◆ _modifiedProperties

List<SerializedProperty> Leap.Unity.CustomEditorBase< T >._modifiedProperties = new List<SerializedProperty>()
protected

Definition at line 45 of file CustomEditorBase.cs.

◆ _showScriptField

bool Leap.Unity.CustomEditorBase< T >._showScriptField = true
protected

Definition at line 40 of file CustomEditorBase.cs.

◆ _specifiedDecorators

Dictionary<string, List<Action<SerializedProperty> > > Leap.Unity.CustomEditorBase< T >._specifiedDecorators
protected

Definition at line 34 of file CustomEditorBase.cs.

◆ _specifiedDrawers

Dictionary<string, Action<SerializedProperty > > Leap.Unity.CustomEditorBase< T >._specifiedDrawers
protected

Definition at line 33 of file CustomEditorBase.cs.

◆ _specifiedPostDecorators

Dictionary<string, List<Action<SerializedProperty> > > Leap.Unity.CustomEditorBase< T >._specifiedPostDecorators
protected

Definition at line 35 of file CustomEditorBase.cs.

◆ target

new T Leap.Unity.CustomEditorBase< T >.target
protected

Definition at line 18 of file CustomEditorBase.cs.

◆ targets

new T [] Leap.Unity.CustomEditorBase< T >.targets
protected

Definition at line 19 of file CustomEditorBase.cs.


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