> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksdictionarydrawer.md).

# Class ksDictionaryDrawer

Namespace: [KS.Unity.Editor](/reactor/api-reference/ks.unity.editor.md)\
Assembly: KSUnity-Editor.dll

Custom property drawer for [ksSerializableDictionary%602](/reactor/api-reference/ks.unity.md#KS_Unity_ksSerializableDictionary_602)

```csharp
[CustomPropertyDrawer(typeof(ksSerializableDictionary<,>))]
public class ksDictionaryDrawer : PropertyDrawer
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) â† GUIDrawer â† PropertyDrawer â† [ksDictionaryDrawer](/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksdictionarydrawer.md)

#### Inherited Members

PropertyDrawer.OnGUI(Rect, SerializedProperty, GUIContent), PropertyDrawer.CreatePropertyGUI(SerializedProperty), PropertyDrawer.GetPropertyHeight(SerializedProperty, GUIContent), PropertyDrawer.CanCacheInspectorGUI(SerializedProperty), PropertyDrawer.attribute, PropertyDrawer.fieldInfo, PropertyDrawer.preferredLabel, [object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Methods

### GetPropertyHeight(SerializedProperty, GUIContent) <a href="#ks_unity_editor_ksdictionarydrawer_getpropertyheight_unityeditor_serializedproperty_unityengine_guic" id="ks_unity_editor_ksdictionarydrawer_getpropertyheight_unityeditor_serializedproperty_unityengine_guic"></a>

Gets the height of the property.

```csharp
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
```

#### Parameters

`property` SerializedProperty

Property to get height for.

`label` GUIContent

Property label.

#### Returns

[float](https://learn.microsoft.com/dotnet/api/system.single)

The height of the property.

### GetPropertyHeight(SerializedProperty) <a href="#ks_unity_editor_ksdictionarydrawer_getpropertyheight_unityeditor_serializedproperty" id="ks_unity_editor_ksdictionarydrawer_getpropertyheight_unityeditor_serializedproperty"></a>

Gets the height of a property.

```csharp
public float GetPropertyHeight(SerializedProperty property)
```

#### Parameters

`property` SerializedProperty

Property to get height for.

#### Returns

[float](https://learn.microsoft.com/dotnet/api/system.single)

The height of the property.

### OnGUI(Rect, SerializedProperty, GUIContent) <a href="#ks_unity_editor_ksdictionarydrawer_ongui_unityengine_rect_unityeditor_serializedproperty_unityengine" id="ks_unity_editor_ksdictionarydrawer_ongui_unityengine_rect_unityeditor_serializedproperty_unityengine"></a>

Draws the property.

```csharp
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
```

#### Parameters

`position` Rect

Position to draw at.

`property` SerializedProperty

Property to draw.

`label` GUIContent

Label for the property.

### SetToDefaultValue(SerializedProperty) <a href="#ks_unity_editor_ksdictionarydrawer_settodefaultvalue_unityeditor_serializedproperty" id="ks_unity_editor_ksdictionarydrawer_settodefaultvalue_unityeditor_serializedproperty"></a>

Sets a property to the default value.

```csharp
public void SetToDefaultValue(SerializedProperty property)
```

#### Parameters

`property` SerializedProperty

Property to set to the default value.
