zombie_mp/Assets/HQ FPS Weapons/Scripts/Inventory/Editor/ItemRecipeDrawer.cs
Sewmina Dilshan 68183e5317 initial
2021-08-23 13:28:33 +05:30

29 lines
1.1 KiB
C#

using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
namespace HQFPSWeapons
{
// [CustomPropertyDrawer(typeof(ItemRecipe))]
// public class ItemRecipeDrawer : PropertyDrawer
// {
// public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
// {
// property.isExpanded = true;
//
// GUI.Label(position, "Recipe", EditorStyles.boldLabel);
//
// position.y = position.yMax + 3f;
// EditorGUI.PropertyField(position, property.FindPropertyRelative("Duration"));
//
// position.y = position.yMax + 3f;
// EditorGUI.PropertyField(position, property.FindPropertyRelative("RequiredItems"));
// }
//
// public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
// {
// var reqItemsHeight = property.isExpanded ? new ReorderableList(property.serializedObject, property.FindPropertyRelative("RequiredItems").FindPropertyRelative("m_List")).GetHeight() : 16f;
// return property.isExpanded ? (2 * EditorGUIUtility.singleLineHeight + reqItemsHeight) : EditorGUIUtility.singleLineHeight;
// }
// }
}