Launching coroutines as a result of received packet.

What is the best way to launch a coroutine as a result from a packet? It seems packets are by nature not analyzed on the main thread and I therefore can’t launch a coroutine. The only solution I can think of is to have the packet handler change a boolean that can launch it in an update loop somewhere. That seems really hacky.

Thanks!

Register event handlers for different messagetypes with NetworkClient.RegisterHandler or similar.