1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 17:26:02 +08:00
xNode/Example/Nodes/Vector.cs
2017-10-29 21:35:01 +01:00

15 lines
462 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 = GetInputByFieldName<float>("x", this.x);
float y = GetInputByFieldName<float>("y", this.y);
float z = GetInputByFieldName<float>("z", this.z);
return new Vector3(x, y, z);
}
}
}