Send events from the render world to the main world #18491
Labels
A-Rendering
Drawing game state to the screen
C-Feature
A new feature, making something new possible
D-Modest
A "normal" level of difficulty; suitable for simple features or challenging fixes
What problem does this solve or what need does it fill?
In some situations, we need to communicate data back to the main world from the render world. This is a non trivial thing to do because of the async nature of the main and render world split. The solution is to use channels, but it's not easy to manage for less advanced users.
The gpu readback feature shows that passing data between these worlds is possible but it's a purpose built abstraction.
What solution would you like?
One possible solution would be to have some kind of
RenderEventWriter
/RenderEventReader
plugin that creates a channel between both worlds and sends any render event to the main world by polling the channel in the main world.What alternative(s) have you considered?
Tell users to write their own channel.
Additional context
We often get comments that the render world is hard to work with because it's hard to communicate data back to the main world. In some cases it comes from a misunderstanding of how the render world is intended to be used, but there are various valid reasons to want to pass some data back to the main world.
The text was updated successfully, but these errors were encountered: