Open itsschwer opened 3 years ago
A close to complete conversion is being worked on here. Refer to commit history of the linked file to see progress.
Last remaining issues are:
HelpBox
for when the number of keys is not equal to the number of values still uses EditorGUILayout
Spacing issue fixed by adding GUILayout.Space(kvpHeight + kvpSpacing);
inside the for
loop and GUILayout.Space(kvpSpacing);
right after it (commit f2763dc).
Thanks Gungnir!
From the Unity documentation on
PropertyDrawer
:Despite seemingly working without error when inspecting
InventorySO
, other classes that haveInventory
fields throw this error when inspected:where
Assets/_Schwer/SchwerScripts/ItemSystem/Editor/InventoryDrawer.cs:23
isproperty.isExpanded = EditorGUILayout.Foldout(property.isExpanded, "Contents (" + keys.arraySize + ")", true);
Commenting out this line just moves the error to the nextEditorGUILayout
function, as expected according to the docs.