Arbor data flow supports lists (arrays).
Please use the behavior of each operation node and state for access.
Example using a list
The following is an example of randomly extracting elements from the list set in ParameterContainer.
- Added StringList parameter to graph parameters.
- Get with GetParameter.
- Add the List.Count operation node to get the number of elements in the string type list.
- Calculate the random index using the number of elements in the obtained list.
- Gets a list element by random index.
- Added SelectString parameter to graph parameters.
- Set the retrieved random element in the SelectString parameter.
- Repeat at 1 second intervals with a TimeTransition to see it change randomly.
Use a calculation node to obtain various data that does not change the elements of List.
Use state behaviors to modify List elements.
Ahead-of-Time (AOT) Restrictions
Due to restrictions in the precompiled environment such as IL2CPP build, an exception will occur when using List<T> that is not referenced from the code.
See Unity - Manual: Scripting restrictions for more information on precompilation limits.
Here's how to use it that causes problems with Arbor.
- List-related built-in scripts
To avoid such AOT problems, add code similar to the following.
You do not need to use the AOTCodeGeneration class.
Writing in a script like this will ensure that the compiler will generate the appropriate code.