Version 3.3.1.2

TwoDimensionalArrayDrawer<TArray, TElement> class

Namespace: Sirenix.OdinInspector.Editor.Drawers
Assembly: Sirenix.OdinInspector.Editor
public abstract class TwoDimensionalArrayDrawer<TArray, TElement> : OdinValueDrawer<TArray> where TArray : IList
Base class for two-dimensional array drawers.
Inheritance

Type Parameters

TArray

TElement

Constructors

TwoDimensionalArrayDrawer()
protected TwoDimensionalArrayDrawer()

Properties

TableMatrixAttribute
Not yet documented.
protected TableMatrixAttribute TableMatrixAttribute { get; }

Methods

CanDrawTypeFilter(Type)

Override this method in order to define custom type constraints to specify whether or not a type should be drawn by the drawer.

Note that Odin's has full support for generic class constraints, so most often you can get away with not overriding CanDrawTypeFilter.

public override bool CanDrawTypeFilter(Type type)
Parameters
System.Type type

Returns
System.Boolean

CompareElement(TElement, TElement)
Compares the element.
protected virtual bool CompareElement(TElement a, TElement b)
Parameters
TElement a

TElement b

Returns
System.Boolean

DrawElement(Rect, TElement)
Draws a table cell element.
protected abstract TElement DrawElement(Rect rect, TElement value)
Parameters
UnityEngine.Rect rect

The rect.

TElement value

The input value.

Returns
TElement

The output value.

DrawPropertyLayout(GUIContent)
Draws the property.
protected override void DrawPropertyLayout(GUIContent label)
Parameters
UnityEngine.GUIContent label

GetDefaultTableMatrixAttributeSettings()
Not yet documented.
protected virtual TableMatrixAttribute GetDefaultTableMatrixAttributeSettings()
OnBeforeDrawTable(IPropertyValueEntry<TArray>, TwoDimensionalArrayDrawer<TArray, TElement>.Context, GUIContent)
This method gets called from DrawPropertyLayout right before the table and error message is drawn.
protected virtual void OnBeforeDrawTable(IPropertyValueEntry<TArray> entry, TwoDimensionalArrayDrawer<TArray, TElement>.Context value, GUIContent label)
Parameters
Sirenix.OdinInspector.Editor.IPropertyValueEntry<TArray> entry

TwoDimensionalArrayDrawer.Context<> value

UnityEngine.GUIContent label

Extension Methods