I use UniRX (C#) which tries to resemble RXJS and others.
I try to make sure my network-dependent objects initialize after the data arrived.
Some of my objects get created and Subscribe later than MSGPlayerDataLoaded actually fired thus never proceed to OnPlayerDataLoaded.
protected virtual void Awake()
{
MessageBroker.Default.Receive<BaseMessage>().Where(msg => msg.id == GameController.MSGPlayerDataLoaded).Subscribe(msg => OnPlayerDataLoaded());
}
Is it possible to look into the past and grab old events since creation of MessageBroker?
From the documentation of RXJS I suspect that something like withLatestFrom could be of help, but it would need a dummy auxiliary stream that looks hacky.