You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have 2 layouts: Lobby has eLobby sheet, and Game has eGame sheet.
eGame contains the OnChange handlers.
eLobby is where the join happens.
When the players join, the server sends "StartGame" message, which triggers the transition to the Game layout.
But the OnChange do not fire in eGame.
What happen is that the state updates are sent while the game is still in Lobby. And since there are no handlers in eLobby, the changes are ignored.
When the eGame is loaded, Colyseus has already fired the events while in eLobby, so the handlers in eGame do not fire.
The SDK solution would be to avoid firing during layout transitions.
A simpler workaround is to check for state at the start of the new layout, and use "Colyseus.State()" to initialize the variables and update them to the latest state value. But it is hard to figure out this workaround; because this happens too fast.
Need to document this limitation
(Requested by @Alaadel)
The text was updated successfully, but these errors were encountered: