
[ad_1]
There are six varieties of variables in Unity’s visible scripting. I’m not 100% clear on the distinction between Graph and Flow Variables.
Here’s probably the most intensive description of them that I’ve seen:
https://docs.unity3d.com/Packages/com.unity.visualscripting@1.7/handbook/vs-variables.html
Currently I take advantage of Object Variables if:
- The knowledge in them is tied to a selected Object
- I want the information to be persistent, so I can entry it later.
I take advantage of Graph Variables if:
- I do not want the variable’s knowledge to persist.
I take advantage of Flow variables if I say have a loop, and must increment some numbers within the loop.
I’d like to make use of Flow variables as typically as attainable, as I assume they’ve a decrease reminiscence footprint (maybe not true?). The method I give it some thought is: a Graph Variable are native to a graph, and a Flow variable is native to a smaller subsection of the graph (as outlined within the screenshot). Is that the proper method to consider Flow variables?
[ad_2]