20 lines
594 B
C#
20 lines
594 B
C#
using UnityEngine;
|
|
using UnityEditor;
|
|
|
|
namespace HQFPSWeapons
|
|
{
|
|
[CustomPropertyDrawer(typeof(ItemDescription))]
|
|
public class ItemDescriptionDrawer : PropertyDrawer
|
|
{
|
|
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
|
{
|
|
position.x -= 16f;
|
|
EditorGUI.PropertyField(position, property.FindPropertyRelative("Description"), GUIContent.none);
|
|
}
|
|
|
|
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
|
{
|
|
return EditorGUI.GetPropertyHeight(property.FindPropertyRelative("Description"), label, true);
|
|
}
|
|
}
|
|
} |