mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-21 01:36:03 +08:00
Add Attribute PortTypeOverride
This commit is contained in:
parent
5967cef277
commit
111378de94
12
Scripts/Attributes/PortTypeOverrideAttribute.cs
Normal file
12
Scripts/Attributes/PortTypeOverrideAttribute.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
/// <summary> Overrides the ValueType of the Port, to have a ValueType different from the type of its serializable field </summary>
|
||||
/// <remarks> Especially useful in Dynamic Port Lists to create Value-Port Pairs with different type. </remarks>
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public class PortTypeOverrideAttribute : Attribute {
|
||||
public Type type;
|
||||
/// <summary> Overrides the ValueType of the Port </summary>
|
||||
/// <param name="type">ValueType of the Port</param>
|
||||
public PortTypeOverrideAttribute(Type type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
11
Scripts/Attributes/PortTypeOverrideAttribute.cs.meta
Normal file
11
Scripts/Attributes/PortTypeOverrideAttribute.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1410c1437e863ab4fac7a7428aaca35b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
x
Reference in New Issue
Block a user