mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 17:26:02 +08:00
15 lines
462 B
C#
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);
|
|
}
|
|
}
|
|
} |