Skip to content

For Each List Item

Loop through all items in a list getting each item in turn.

Use this to run actions on each item in a list.

ForeachListItem Targets

Add actions after this action to run in the loop.

For example, to destroy each GameObject in an Enemies list:

Destroy Enemies

Parameters

Parameter Description
List The list to loop through.
Item Store the current item in a variable.
Current Index Store the index of the current child. Incremented by one each time through the loop.
Reset On Exit State Reset the loop when exiting the state. Set this to true to restart the loop every time the state is entered.

For example, if you're using the loop to find the first match in a list, and you want to check the whole list every time."