diff options
Diffstat (limited to 'Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Vector.cs')
-rw-r--r-- | Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Vector.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Vector.cs b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Vector.cs new file mode 100644 index 00000000..1f43e6ff --- /dev/null +++ b/Other/NodeEditorExamples/Assets/xNode-examples/Examples/MathGraph/Nodes/Vector.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +namespace XNode.Examples.MathNodes { + public class Vector : XNode.Node { + [Input] public float x, y, z; + [Output] public Vector3 vector; + + public override object GetValue(XNode.NodePort port) { + vector.x = GetInputValue<float>("x", this.x); + vector.y = GetInputValue<float>("y", this.y); + vector.z = GetInputValue<float>("z", this.z); + return vector; + } + } +}
\ No newline at end of file |