From ecb863630c1f212c1f086ae29ace20b662fec3fe Mon Sep 17 00:00:00 2001 From: Icarus <1375400884@qq.com> Date: Mon, 2 Dec 2019 17:57:35 +0800 Subject: [PATCH] !W(Node) one new Attribute `LabelAttribute` --- Scripts/Node.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Scripts/Node.cs b/Scripts/Node.cs index 9996e73..27f208d 100644 --- a/Scripts/Node.cs +++ b/Scripts/Node.cs @@ -366,6 +366,19 @@ namespace XNode { this.width = width; } } + + /// Custom Port Label + [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)] + public class LabelAttribute : Attribute + { + public string Label { get; } + + public LabelAttribute(string label) + { + Label = label; + } + } + #endregion [Serializable] private class NodePortDictionary : Dictionary, ISerializationCallbackReceiver {