Unit Reference Increment Variable - RealityStop/Bolt.Addons.Community GitHub Wiki
The Increment Variable node is a convenience node roughly equivalent to the numerical '++' operator in C++ or C#. The Increment Variable node can replicate both pre-increment (++X) and post-increment (X++) forms. It is only valid on numerical variables (int or float)
The unit operates like a union of the Get and Set Variable nodes Bolt already offers. Of particular note, the unit takes a control flow input. This is for convenience, allowing the user to specify when the increment should take place and to maintain the convention that variables should only change when the user indicates they should.
The output ports are somewhat different.
Output Ports
- pre : Specifies what the numerical variable was before it was incremented. To be clear, this means that the actual variable will be 1 greater than the value of pre. This is consistent with C#'s ++X behavior. |
- post : Specifies what the numerical variable is after it is incremented. If one was to do a "Get Variable" after the increment, they would get this modified value. This is consistent with C#'s X++ behavior. |