<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/looking-at-unity-finally-made-me-understand-the-point-of-c-coroutines-mathieu-ropert-lyk7zdbtl" -->

---
title: Looking at Unity finally made me understand the point of...
description: C++ coroutines have existed for 6 years but remain underused partly due to a lack of compelling real-world examples. Examining Unity&#x27;s C# coroutine pattern for...
canonical: https://daily.dev/posts/looking-at-unity-finally-made-me-understand-the-point-of-c-coroutines-mathieu-ropert-lyk7zdbtl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Looking at Unity finally made me understand the point of C++ coroutines · Mathieu Ropert | daily.dev
og:description: C++ coroutines have existed for 6 years but remain underused partly due to a lack of compelling real-world examples. Examining Unity&#x27;s C# coroutine pattern for...
og:url: https://daily.dev/posts/looking-at-unity-finally-made-me-understand-the-point-of-c-coroutines-mathieu-ropert-lyk7zdbtl
og:image: https://api.daily.dev/og/posts/lYk7zdBTL.png
og:image:alt: Looking at Unity finally made me understand the point of C++ coroutines · Mathieu Ropert
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Looking at Unity finally made me understand the point of C++ coroutines · Mathieu Ropert

**[Hacker News](https://daily.dev/sources/hn)** · 9 min read · 0 upvotes · 0 comments

## Summary

C++ coroutines have existed for 6 years but remain underused partly due to a lack of compelling real-world examples. Examining Unity's C# coroutine pattern for game effects reveals a practical use case: replacing ugly hand-written state machines with clean, readable coroutine functions. Using C++23's std::generator, the author implements a Unity-style effects manager in under 100 lines that runs per-frame coroutines, advancing each one step per game loop tick. The post also shows how yielding renderable objects instead of side effects enables parallel execution with TBB, making the approach both ergonomic and efficient for game effect systems.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://mropert.github.io/2026/03/20/unity_cpp_coroutines/>

---

Tags: [#game-development](https://daily.dev/tags/game-development), [#unity](https://daily.dev/tags/unity), [#c++](https://daily.dev/tags/c++)

[View this post on daily.dev](https://daily.dev/posts/looking-at-unity-finally-made-me-understand-the-point-of-c-coroutines-mathieu-ropert-lyk7zdbtl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Looking at Unity finally made me understand the point of C++ coroutines · Mathieu Ropert","url":"https://daily.dev/posts/looking-at-unity-finally-made-me-understand-the-point-of-c-coroutines-mathieu-ropert-lyk7zdbtl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/looking-at-unity-finally-made-me-understand-the-point-of-c-coroutines-mathieu-ropert-lyk7zdbtl"},"datePublished":"2026-03-25T14:39:10.458Z","dateModified":"2026-03-25T14:39:45.490Z","description":"C++ coroutines have existed for 6 years but remain underused partly due to a lack of compelling real-world examples. Examining Unity's C# coroutine pattern for...","image":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","thumbnailUrl":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/looking-at-unity-finally-made-me-understand-the-point-of-c-coroutines-mathieu-ropert-lyk7zdbtl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"game-development,unity,c++","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Looking at Unity finally made me understand the point of C++ coroutines · Mathieu Ropert"}]}
```

