Erroneous Variable Behavior with Chained For-Loops
DarkInsanePyro
Decided to check out UdonGraph and started on my first project, of course in an Alpha it did not go without some issue. :) See the following:
Issue:
Chaining the exit flow of one for loop into the entrance flow of another for loop appears to cause bizarre variable read/write errors. The flow of the graph appears correct, but variables/constants are really not being read correctly and based on project-level troubleshooting, may not write correctly either. Even a const string is being read null under some circumstances. The issue persists until I remove the 2nd flow going into the 2nd for loop. Even if I detach the custom event and leave the inexecutable section of graph, the issue persists.
Expected Behavior:
To be able to chain for-loops together without complications.
Things I tried:
Public / Private variables, enable sync on variables, toggled every option I basically could find (yes, great diagnostic tool I know)
Details:
With the provided example graph, I provided the following stimulus: interact, interact, custom, custom, interact, custom and received the following output:
Full Event
Loop 1 - Iteration 0
Loop 1 - Iteration 1
Loop 1 - Iteration 2
Null
Null
Null
Null
Null
Null
Full Event
Loop 1 - Iteration 0
Loop 1 - Iteration 1
Loop 1 - Iteration 2
Null
Null
Null
Null
Null
Null
Partial Event
Loop 2 - Iteration 0
Loop 2 - Iteration 1
Loop 2 - Iteration 2
Loop 2 - Iteration 3
Loop 2 - Iteration 4
Done
Partial Event
Loop 2 - Iteration 0
Loop 2 - Iteration 1
Loop 2 - Iteration 2
Loop 2 - Iteration 3
Loop 2 - Iteration 4
Done
Full Event
Loop 1 - Iteration 0
Loop 1 - Iteration 1
Loop 1 - Iteration 2
Loop 2 - Iteration 4
Loop 2 - Iteration 4
Loop 2 - Iteration 4
Loop 2 - Iteration 4
Loop 2 - Iteration 4
Done
Partial Event
Loop 2 - Iteration 0
Loop 2 - Iteration 1
Loop 2 - Iteration 2
Loop 2 - Iteration 3
Loop 2 - Iteration 4
Done
Information:
Project: Fresh Install, No Packages except VRC SDK V3
Unity Version: 2018.4.20f1
SDK Version Date: 2021.01.28.19.07
Serialized Graph: https://pastebin.com/dkXjGgcz
Log In
ShingenPizza
Hey there,
i tried to recreate this issue with the newest SDK (3.1.13), but it works fine for me. Looks like they've fixed it at some time during those 2 years.
Also your serialized graph pastebin is gone now, so i can't compare it to the one Udon generated for me :(