Iteration
3_ScriptableList
Last updated
3_ScriptableList
Last updated
Find the PlayerNotifier.cs in the scene.
You can iterate through the list using IEnumerable, an index iteration or a ForEach. In the PlayerNotifier, I show an example on how to use any iteration mode to call a method on each player.
This can be useful in different cases. If you need to iterate over a list of enemies but you want independent code for things like making abilities, power ups etc.).