1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 09:16:01 +08:00

Add Attribute PortTypeOverride

This commit is contained in:
guizix 2023-06-29 13:09:43 +08:00 committed by GitHub
parent 5967cef277
commit 111378de94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

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

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1410c1437e863ab4fac7a7428aaca35b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: