0
Answered

When I am not accessing a unit on the Flow, how many times has this unit been used?

Personuo 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 3


A simple example, when I set Variable ,How many times has the Add unit been calculated

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

that Add unit has var1 input 

+2

Twice, though since there are no side effects, the same value is computed each time.

See here for a bit more information:

https://support.ludiq.io/communities/5/topics/1080-control-flows-and-caching

Basically, because it does not have a control flow, the value has to be recomputed because the input might have changed between executions.

+1
Answered

Indeed! If you want to enforce it being calculated only once, use the Cache unit.