Class Cache
Caches the input so that all nodes connected to the output retrieve the value only once.
Inherited Members
Namespace: Unity.VisualScripting
Syntax
[UnitCategory("Control")]
[UnitOrder(15)]
public sealed class Cache : Unit, IUnit, IGraphElementWithDebugData, IGraphElement, IGraphItem, INotifiedCollectionItem, IDisposable, IPrewarmable, IAotStubbable, IIdentifiable
Properties
enter
The moment at which to cache the value. The output value will only get updated when this gets triggered.
Declaration
[DoNotSerialize]
public ControlInput enter { get; }
Property Value
Type | Description |
---|---|
ControlInput |
exit
The action to execute once the value has been cached.
Declaration
[DoNotSerialize]
public ControlOutput exit { get; }
Property Value
Type | Description |
---|---|
ControlOutput |
input
The value to cache when the node is entered.
Declaration
[DoNotSerialize]
public ValueInput input { get; }
Property Value
Type | Description |
---|---|
ValueInput |
output
The cached value, as it was the last time this node was entered.
Declaration
[DoNotSerialize]
[PortLabel("Cached")]
public ValueOutput output { get; }
Property Value
Type | Description |
---|---|
ValueOutput |
Methods
Definition()
Declaration
protected override void Definition()