namespace Unity.VisualScripting { [UnitOrder(601)] public abstract class PerSecond : Unit { /// /// The input value. /// [DoNotSerialize] [PortLabelHidden] public ValueInput input { get; private set; } /// /// The framerate-normalized value (multiplied by delta time). /// [DoNotSerialize] [PortLabelHidden] public ValueOutput output { get; private set; } protected override void Definition() { input = ValueInput(nameof(input), default(T)); output = ValueOutput(nameof(output), Operation); Requirement(input, output); } public abstract T Operation(T input); public T Operation(Flow flow) { return Operation(flow.GetValue(input)); } } }