InspectorTypeDrawingConfig

Contains configuration data for which types Odin should draw in the inspector.

namespace Sirenix.OdinInspector.Editor
{
public sealed class InspectorTypeDrawingConfig
}

Requirements

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector
Version: 1.0.6.1

See Also

Static Fields

Return Type Definition Description
TwoWaySerializationBinder TypeBinder

The type binder that the InspectorTypeDrawingConfig uses to bind types to names, and names to types.

This is usually an instance of DefaultSerializationBinder.

Static Methods

Return Type Definition Description
Type GetDefaultEditorType(Type) Gets the default editor that this type would have, if no custom editor was set for this type in particular. This is calculated using the value of DefaultEditorBehaviour.
Type GetEditorDrawnType(Type, ref bool)

Gets the type that an editor draws, by extracting it from the editor's CustomEditor attribute, if it is declared.

This method returns null for abstract editor types, as those can never draw anything.

bool UnityInspectorEditorIsValidBase(Type) Checks whether the given editor can be assigned to draw any type using the InspectorTypeDrawingConfig class.
bool UnityInspectorEditorIsValidBase(Type, Type)

Checks whether the given editor can be assigned to draw a given type using the InspectorTypeDrawingConfig class.

This method checks the CustomEditor attribute on the type for whether the given type is compatible.

Methods

Return Type Definition Description
void ClearEditorEntryForDrawnType(Type) Clears the editor type entry for the given drawer, so it will be set to Unity's default.
List<Type> GetAllDrawnTypesWithEntries() Gets a list of all drawn types that have entries in the drawing config.
Type GetEditorType(Type) Gets which editor type would draw the given type. If the type has not been assigned a custom editor type in the config, the default editor type is returned using GetDefaultEditorType(Type).
bool HasEntryForType(Type) Determines whether an editor value has been assigned for a given drawn type.
void ResetToDefault() Resets the drawing configuration to the default values.
void SetEditorType(Type, Type) Assigns a given editor to draw a given type.
void UpdateCaches() Forces the config's internal drawer type to value type lookup cache to rebuild itself.