public override void OnInspectorGUI()
{
serializedObject.Update();
GUILayout.BeginVertical("Box");
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(mainInventory, new GUIContent("Player Inventory"));
if (EditorGUI.EndChangeCheck())
{
inv.setAsMain();
}
GUILayout.EndVertical();
GUILayout.BeginVertical("Box");
EditorGUI.indentLevel++;
GUILayout.BeginVertical("Box");
showInventorySettings = EditorGUILayout.Foldout(showInventorySettings, "Inventory Settings");
if (showInventorySettings)
{
sizeOfInventoryGUI();
}
GUILayout.EndVertical();
if (!inv.characterSystem())
{
GUILayout.BeginVertical("Box");
showStackableItemsSettings = EditorGUILayout.Foldout(showStackableItemsSettings, "Stacking/Splitting");
if (showStackableItemsSettings)
{
stackableItemsSettings();
GUILayout.Space(20);
}
GUILayout.EndVertical();
}
EditorGUI.indentLevel--;
GUILayout.EndVertical();
serializedObject.ApplyModifiedProperties();
SceneView.RepaintAll();
GUILayout.BeginVertical("Box");
addItemGUI();
GUILayout.EndVertical();
}