XposeCraft  1.0.1-rc1
Developer API
XposeCraft.Inspector.DictionaryDrawer< TKey, TValue > Class Template Reference

To use, inherit this generic class to a non-generic version (no need to be public) and annotate [CustomPropertyDrawer(typeof(MyDictionary))] where MyDictionary is the name of non-generic dictionary. More...

Inheritance diagram for XposeCraft.Inspector.DictionaryDrawer< TKey, TValue >:

Public Member Functions

override float GetPropertyHeight (SerializedProperty property, GUIContent label)
 
override void OnGUI (Rect position, SerializedProperty property, GUIContent label)
 

Detailed Description

To use, inherit this generic class to a non-generic version (no need to be public) and annotate [CustomPropertyDrawer(typeof(MyDictionary))] where MyDictionary is the name of non-generic dictionary.

Source: https://forum.unity3d.com/threads/finally-a-serializable-dictionary-for-unity-extracted-from-system-collections-generic.335797/

Template Parameters
TKeyThe type of keys in the dictionary.
TValueThe type of values in the dictionary.

Member Function Documentation

◆ GetPropertyHeight()

override float XposeCraft.Inspector.DictionaryDrawer< TKey, TValue >.GetPropertyHeight ( SerializedProperty  property,
GUIContent  label 
)

◆ OnGUI()

override void XposeCraft.Inspector.DictionaryDrawer< TKey, TValue >.OnGUI ( Rect  position,
SerializedProperty  property,
GUIContent  label 
)

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