diff --git a/Scripts/Attributes/PortTypeOverrideAttribute.cs b/Scripts/Attributes/PortTypeOverrideAttribute.cs new file mode 100644 index 0000000..316ca2d --- /dev/null +++ b/Scripts/Attributes/PortTypeOverrideAttribute.cs @@ -0,0 +1,12 @@ +using System; +/// Overrides the ValueType of the Port, to have a ValueType different from the type of its serializable field +/// Especially useful in Dynamic Port Lists to create Value-Port Pairs with different type. +[AttributeUsage(AttributeTargets.Field)] +public class PortTypeOverrideAttribute : Attribute { + public Type type; + /// Overrides the ValueType of the Port + /// ValueType of the Port + public PortTypeOverrideAttribute(Type type) { + this.type = type; + } +} diff --git a/Scripts/Attributes/PortTypeOverrideAttribute.cs.meta b/Scripts/Attributes/PortTypeOverrideAttribute.cs.meta new file mode 100644 index 0000000..a587759 --- /dev/null +++ b/Scripts/Attributes/PortTypeOverrideAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1410c1437e863ab4fac7a7428aaca35b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: