Files
Cielonos/Packages/dev.yarnspinner.unity/Editor/Utility/InterfaceContainerDrawer.cs
SoulliesOfficial 8186f54e90 新场景,剧情
2026-06-02 12:55:39 -04:00

16 lines
550 B
C#

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));
}
}
}