同步
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user