private void DrawPriceSettings(UpgradePriceSettings priceSettings)
        {
            SerializedObject serializedObject = new SerializedObject(priceSettings);

            serializedObject.Update();
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PropertyField(serializedObject.FindProperty("pricePrefix"));
            EditorGUILayout.PropertyField(serializedObject.FindProperty("priceSuffix"));
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            var existingType = priceSettings.PriceProgression.GetType() == typeof(ArithmeticProgression) ? ProgressionType.Arithmetic : ProgressionType.Geometric;

            progressionType = existingType;

            SerializedObject serializedProgression = new SerializedObject(priceSettings.PriceProgression);

            serializedProgression.Update();
            DrawDefaultInspector(serializedProgression);

            serializedProgression.ApplyModifiedProperties();

            progressionType = (ProgressionType)EditorGUILayout.EnumPopup(progressionType);
            if (existingType != progressionType)
            {
                UpgradesUtility.ChangeProgressionType(priceSettings, progressionType);
            }

            EditorGUILayout.EndHorizontal();

            serializedObject.ApplyModifiedProperties();
        }
        private void DrawValueSettings(UpgradeValueSettings valueSettings, int index)
        {
            if (valueSettings == null)
            {
                return;
            }

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField(index.ToString());
            if (GUILayout.Button("X", GUILayout.MaxWidth(24)))
            {
                UpgradesUtility.RemoveValueSettings(valueSettings);
                UpgradesUtility.RemoveMissingValueSettings();
                return;
            }

            EditorGUILayout.EndHorizontal();

            SerializedObject serializedObject = new SerializedObject(valueSettings);

            serializedObject.Update();
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PropertyField(serializedObject.FindProperty("valueName"));
            EditorGUILayout.PropertyField(serializedObject.FindProperty("prefix"));
            EditorGUILayout.PropertyField(serializedObject.FindProperty("suffix"));
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            var existingType = valueSettings.ValueProgression.GetType() == typeof(ArithmeticProgression) ? ProgressionType.Arithmetic : ProgressionType.Geometric;

            progressionType = existingType;

            SerializedObject serializedProgression = new SerializedObject(valueSettings.ValueProgression);

            serializedProgression.Update();
            DrawDefaultInspector(serializedProgression);

            serializedProgression.ApplyModifiedProperties();

            progressionType = (ProgressionType)EditorGUILayout.EnumPopup(progressionType);
            if (existingType != progressionType)
            {
                UpgradesUtility.ChangeProgressionType(valueSettings, progressionType);
            }

            EditorGUILayout.EndHorizontal();
            serializedObject.ApplyModifiedProperties();
        }