List (Array)
Arbor data flow supports lists (arrays).
Please use the behavior of each operation node and state for access.

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.
- List.Contains
- List.Count
- List.GetElement
- List.IndexOf
- List.LastIndexOf
- List.ToArrayList
- NewArrayList
Use state behaviors to modify List elements.
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.
- Parameter
- AssetObjectList
- ComponentList
- EnumList
- 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.