namespace Unity.VisualScripting { [UnitOrder(403)] public abstract class Angle : Unit { /// /// The first vector. /// [DoNotSerialize] public ValueInput a { get; private set; } /// /// The second vector. /// [DoNotSerialize] public ValueInput b { get; private set; } /// /// The angle between A and B. /// [DoNotSerialize] [PortLabelHidden] public ValueOutput angle { get; private set; } protected override void Definition() { a = ValueInput(nameof(a)); b = ValueInput(nameof(b)); angle = ValueOutput(nameof(angle), Operation).Predictable(); Requirement(a, angle); Requirement(b, angle); } private float Operation(Flow flow) { return Operation(flow.GetValue(a), flow.GetValue(b)); } public abstract float Operation(T a, T b); } }