This is the only thing, although the advice applies anywhere.
Developers do not expect the IEnumerable
iteration to change the state of the program. This is not what IEnumerable
intended for and is inconsistent behavior with all .NET.
What Unity does is use yield return
as a pseudo-coroutine, and this will cause confusion for any developers unfamiliar with this.
In modern C #, we have async / await to accomplish what Unity intended, but Unity was done before this function was available.
source share