mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 09:16:01 +08:00
Internal NodePorts now uses dicts instead of lists. This is faster and more manageable. Added instance ports. Added Node.Ports, Node.Outputs, Node.Inputs, Node.InstanceOutputs, Node.InstanceInputs Changed public GetInputByFieldName to GetInputValue and GetInputPort
15 lines
444 B
C#
15 lines
444 B
C#
using UnityEngine;
|
|
|
|
namespace BasicNodes {
|
|
public class Vector : Node {
|
|
[Input] public float x, y, z;
|
|
[Output] public Vector3 vector;
|
|
|
|
public override object GetValue(NodePort port) {
|
|
float x = GetInputValue<float>("x", this.x);
|
|
float y = GetInputValue<float>("y", this.y);
|
|
float z = GetInputValue<float>("z", this.z);
|
|
return new Vector3(x, y, z);
|
|
}
|
|
}
|
|
} |