From 556547b54137736e9f802cbb6353585afd9e05b6 Mon Sep 17 00:00:00 2001 From: guizix <46198159+guizix@users.noreply.github.com> Date: Thu, 29 Jun 2023 13:18:29 +0800 Subject: [PATCH] Enables Port Type Override When Constructing a NodePort, check the PortTypeOverrideAttribute to change the ValueType of the Port. --- Scripts/NodePort.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Scripts/NodePort.cs b/Scripts/NodePort.cs index b8656ef..1fbc62f 100644 --- a/Scripts/NodePort.cs +++ b/Scripts/NodePort.cs @@ -79,6 +79,10 @@ namespace XNode { _connectionType = (attribs[i] as Node.OutputAttribute).connectionType; _typeConstraint = (attribs[i] as Node.OutputAttribute).typeConstraint; } + // Override ValueType of the Port + if(attribs[i] is PortTypeOverrideAttribute) { + ValueType = (attribs[i] as PortTypeOverrideAttribute).type; + } } }