namespace Unity.VisualScripting { [UnitOrder(401)] public abstract class Normalize : Unit { /// /// The vector to normalize. /// [DoNotSerialize] [PortLabelHidden] public ValueInput input { get; private set; } /// /// The normalized vector. /// [DoNotSerialize] [PortLabelHidden] public ValueOutput output { get; private set; } protected override void Definition() { input = ValueInput(nameof(input)); output = ValueOutput(nameof(output), Operation).Predictable(); Requirement(input, output); } private T Operation(Flow flow) { return Operation(flow.GetValue(input)); } public abstract T Operation(T input); } }