Files
ichni_Official/Packages/dev.yarnspinner.unity/Editor/Utility/InterfaceContainerDrawer.cs

16 lines
550 B
C#
Raw Normal View History

2026-06-09 11:21:59 -04:00
using UnityEditor;
using UnityEngine;
namespace Yarn.Unity.Editor
{
[CustomPropertyDrawer(typeof(InterfaceContainer<>), true)]
public class InterfaceContainerDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
var targetProp = property.FindPropertyRelative(nameof(InterfaceContainer<UnityEngine.Object>.targetObject));
EditorGUI.ObjectField(position, targetProp, new UnityEngine.GUIContent(property.displayName));
}
}
}