Version: 1.16.0.9 steam
How to reproduce:
1. Create a Lua Compute node, in lua code section type:
return 1
2. Connect the output of the Lua Compute node with a Number node (serves as display)
3. Hit compile on the Lua Compute node. The expected result would be the Number node showing "1" but it is always "0"
4. Change the Function Name of the Lua Compute node to any legal function name, hit Compile
5. The Number node now shows "1" correctly.
6. change the code in Lua Compute node to return 2 and hit compile, similarly, the Number node is showing "1", but changing the name of the function solves the issue
Remarks:
1. Nodes seem to be "late for 1 compilation": the input value of print or number nodes seem to be updated when changing the return value of the preceding Lua Compute node, but the output value which suppose to just forward the input value is still the old value.
2. It might not be Lua Compute node that is the source of the problem, but rather how nodes are updated, due to the "late for 1 compilation" described above.
Observe another scenario:
We still connect a Lua Compute to a number node, and write return 1 in Lua Code section. Hit compile, the number node shows 0. Now, we change the code to return 2 , and hit recompile. This time, the number node shows 1.
This suggests that any code change in Lua Compute would update the next node, to a previous value, it just happen that updating the function name is a way to update the value correctly as the return value doesn't change between 2 compilations.