[DiscordArchive] that's like, 15 years later ?
[DiscordArchive] that's like, 15 years later ?
Archived author: Fabian • Posted: 2024-06-01T12:43:26.800000+00:00
Original source
And actually hurt the performance in other cases very often
Archived author: jackpoz • Posted: 2024-06-01T12:44:35.581000+00:00
Original source
https://docs.unity3d.com/2023.2/Document...tines.html
Archived author: Fabian • Posted: 2024-06-01T12:44:35.910000+00:00
Original source
The only thing you habe there is that you can iterate through the worldwrverlist as object directly. Thats it
Archived author: jackpoz • Posted: 2024-06-01T12:44:40.140000+00:00
Original source
this is how you use it in Unity
Archived author: jackpoz • Posted: 2024-06-01T12:45:18.434000+00:00
Original source
it's very easy to write custom iterators with whatever logic you want
Archived author: jackpoz • Posted: 2024-06-01T12:46:11.051000+00:00
Original source
```
IEnumerator Fade()
{
Color c = renderer.material.color;
for (float alpha = 1f; alpha >= 0; alpha -= 0.1f)
{
c.a = alpha;
renderer.material.color = c;
yield return new WaitForSeconds(.1f);
}
}
```
and this is how you use it in Unity
Archived author: jackpoz • Posted: 2024-06-01T12:46:26.161000+00:00
Original source
no need to worry about callbacks etc
Archived author: jackpoz • Posted: 2024-06-01T12:46:58.014000+00:00
Original source
it looks better than all the switch code in our scripts with 100 cases
Archived author: Fabian • Posted: 2024-06-01T12:51:01.135000+00:00
Original source
Its only purpose is literally allowing to iterate and return data from that iteration before it actually finishes the iteration. And besides saving some allocations here and there I do not see any purpose and has almost always better alternatives that are also easier to work wih and understand. Especially while debugging issues xd
Archived author: jackpoz • Posted: 2024-06-01T12:57:16.726000+00:00
Original source
it's sort of a different way than .ContinueWith()