docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Cooldown

    Runs a cooldown timer to throttle flow and outputs remaining measurements.

    Inheritance
    object
    GraphElement<FlowGraph>
    Unit
    Cooldown
    Implements
    IUnit
    IGraphElementWithDebugData
    IGraphElementWithData
    IGraphElement
    IGraphItem
    INotifiedCollectionItem
    IDisposable
    IPrewarmable
    IAotStubbable
    IIdentifiable
    IAnalyticsIdentifiable
    IGraphEventListener
    Inherited Members
    Unit.CreateDebugData()
    Unit.AfterAdd()
    Unit.BeforeRemove()
    Unit.Instantiate(GraphReference)
    Unit.Uninstantiate(GraphReference)
    Unit.canDefine
    Unit.failedToDefine
    Unit.isDefined
    Unit.EnsureDefined()
    Unit.Define()
    Unit.RemoveUnconnectedInvalidPorts()
    Unit.controlInputs
    Unit.controlOutputs
    Unit.valueInputs
    Unit.valueOutputs
    Unit.invalidInputs
    Unit.invalidOutputs
    Unit.inputs
    Unit.outputs
    Unit.validInputs
    Unit.validOutputs
    Unit.ports
    Unit.invalidPorts
    Unit.validPorts
    Unit.onPortsChanged
    Unit.PortsChanged()
    Unit.defaultValues
    Unit.relations
    Unit.connections
    Unit.Disconnect()
    Unit.isControlRoot
    Unit.position
    Unit.definitionException
    Unit.GetAnalyticsIdentifier()
    GraphElement<FlowGraph>.guid
    GraphElement<FlowGraph>.BeforeAdd()
    GraphElement<FlowGraph>.AfterRemove()
    GraphElement<FlowGraph>.Dispose()
    GraphElement<FlowGraph>.dependencyOrder
    GraphElement<FlowGraph>.HandleDependencies()
    GraphElement<FlowGraph>.graph
    GraphElement<FlowGraph>.deserializationDependencies
    GraphElement<FlowGraph>.GetAotStubs(HashSet<object>)
    GraphElement<FlowGraph>.Prewarm()
    GraphElement<FlowGraph>.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.VisualScripting
    Assembly: Unity.VisualScripting.Flow.dll
    Syntax
    [UnitCategory("Time")]
    [TypeIcon(typeof(Timer))]
    [UnitOrder(8)]
    public sealed class Cooldown : Unit, IUnit, IGraphElementWithDebugData, IGraphElementWithData, IGraphElement, IGraphItem, INotifiedCollectionItem, IDisposable, IPrewarmable, IAotStubbable, IIdentifiable, IAnalyticsIdentifiable, IGraphEventListener

    Properties

    becameReady

    Called when the cooldown timer reaches zero.

    Declaration
    [DoNotSerialize]
    [PortLabel("Completed")]
    public ControlOutput becameReady { get; }
    Property Value
    Type Description
    ControlOutput

    duration

    The total duration of the cooldown.

    Declaration
    [DoNotSerialize]
    public ValueInput duration { get; }
    Property Value
    Type Description
    ValueInput

    enter

    The moment at which to try using the cooldown.

    Declaration
    [DoNotSerialize]
    public ControlInput enter { get; }
    Property Value
    Type Description
    ControlInput

    exitNotReady

    Called upon entry when the cooldown is not yet ready.

    Declaration
    [DoNotSerialize]
    [PortLabel("Not Ready")]
    public ControlOutput exitNotReady { get; }
    Property Value
    Type Description
    ControlOutput

    exitReady

    Called upon entry when the cooldown is ready.

    Declaration
    [DoNotSerialize]
    [PortLabel("Ready")]
    public ControlOutput exitReady { get; }
    Property Value
    Type Description
    ControlOutput

    remainingRatio

    The proportion of the duration remaining until the cooldown is ready (0-1).

    Declaration
    [DoNotSerialize]
    [PortLabel("Remaining %")]
    public ValueOutput remainingRatio { get; }
    Property Value
    Type Description
    ValueOutput

    remainingSeconds

    The number of seconds remaining until the cooldown is ready.

    Declaration
    [DoNotSerialize]
    [PortLabel("Remaining")]
    public ValueOutput remainingSeconds { get; }
    Property Value
    Type Description
    ValueOutput

    reset

    Trigger to force reset the cooldown.

    Declaration
    [DoNotSerialize]
    public ControlInput reset { get; }
    Property Value
    Type Description
    ControlInput

    tick

    Called each frame while the cooldown timer is active.

    Declaration
    [DoNotSerialize]
    public ControlOutput tick { get; }
    Property Value
    Type Description
    ControlOutput

    unscaledTime

    Whether to ignore the time scale.

    Declaration
    [DoNotSerialize]
    [PortLabel("Unscaled")]
    public ValueInput unscaledTime { get; }
    Property Value
    Type Description
    ValueInput

    Methods

    CreateData()

    Declaration
    public IGraphElementData CreateData()
    Returns
    Type Description
    IGraphElementData

    Definition()

    Declaration
    protected override void Definition()
    Overrides
    Unit.Definition()

    IsListening(GraphPointer)

    Declaration
    public bool IsListening(GraphPointer pointer)
    Parameters
    Type Name Description
    GraphPointer pointer
    Returns
    Type Description
    bool

    StartListening(GraphStack)

    Declaration
    public void StartListening(GraphStack stack)
    Parameters
    Type Name Description
    GraphStack stack

    StopListening(GraphStack)

    Declaration
    public void StopListening(GraphStack stack)
    Parameters
    Type Name Description
    GraphStack stack

    Update(Flow)

    Declaration
    public void Update(Flow flow)
    Parameters
    Type Name Description
    Flow flow

    Implements

    IUnit
    IGraphElementWithDebugData
    IGraphElementWithData
    IGraphElement
    IGraphItem
    INotifiedCollectionItem
    IDisposable
    IPrewarmable
    IAotStubbable
    IIdentifiable
    IAnalyticsIdentifiable
    IGraphEventListener

    Extension Methods

    Cloning.Clone(object, ICloner, bool)
    Cloning.Clone(object, ICloner, bool)
    Cloning.CloneViaFakeSerialization(object)
    Cloning.CloneViaFakeSerialization(object)
    ConversionUtility.ConvertTo(object, Type)
    ConversionUtility.ConvertTo(object, Type)
    ConversionUtility.ConvertTo<T>(object)
    ConversionUtility.ConvertTo<T>(object)
    ConversionUtility.IsConvertibleTo(object, Type, bool)
    ConversionUtility.IsConvertibleTo(object, Type, bool)
    ConversionUtility.IsConvertibleTo<T>(object, bool)
    ConversionUtility.IsConvertibleTo<T>(object, bool)
    Serialization.Serialize(object, bool)
    Serialization.Serialize(object, bool)
    TypeUtility.ToShortString(object, int)
    TypeUtility.ToShortString(object, int)
    UnityObjectUtility.IsUnityNull(object)
    UnityObjectUtility.IsUnityNull(object)
    UnityObjectUtility.ToSafeString(object)
    UnityObjectUtility.ToSafeString(object)
    XAnalyserProvider.Analyser(object, GraphReference)
    XAnalyserProvider.Analyser(object, IGraphContext)
    XAnalyserProvider.Analyser<TAnalyser>(object, GraphReference)
    XAnalyserProvider.Analyser<TAnalyser>(object, IGraphContext)
    XAnalyserProvider.Analysis(object, GraphReference)
    XAnalyserProvider.Analysis(object, IGraphContext)
    XAnalyserProvider.Analysis<TAnalysis>(object, GraphReference)
    XAnalyserProvider.Analysis<TAnalysis>(object, IGraphContext)
    XDescriptorProvider.Describe(object)
    XDescriptorProvider.Description(object)
    XDescriptorProvider.Description<TDescription>(object)
    XDescriptorProvider.Descriptor(object)
    XDescriptorProvider.Descriptor<TDescriptor>(object)
    XDescriptorProvider.HasDescriptor(object)
    Cloning.CloneViaFakeSerialization<T>(T)
    Cloning.CloneViaFakeSerialization<T>(T)
    Cloning.Clone<T>(T, ICloner, bool)
    Cloning.Clone<T>(T, ICloner, bool)
    LinqUtility.Yield<T>(T)
    LinqUtility.Yield<T>(T)
    Serialization.CloneViaSerializationInto<TSource, TDestination>(TSource, ref TDestination, bool)
    Serialization.CloneViaSerializationInto<TSource, TDestination>(TSource, ref TDestination, bool)
    Serialization.CloneViaSerialization<T>(T, bool)
    Serialization.CloneViaSerialization<T>(T, bool)
    GraphsExceptionUtility.GetException(IGraphElementWithDebugData, GraphPointer)
    GraphsExceptionUtility.HandleException(IGraphElementWithDebugData, GraphPointer, Exception)
    GraphsExceptionUtility.SetException(IGraphElementWithDebugData, GraphPointer, Exception)
    XGraphEventListener.StartListening(IGraphEventListener, GraphReference)
    XGraphEventListener.StopListening(IGraphEventListener, GraphReference)
    XUnit.CompatibleValueInput(IUnit, Type)
    XUnit.CompatibleValueOutput(IUnit, Type)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)