DataChange of Item in MapSchema include changes not correct #618
-
Hi @endel and community developer! I'm in progressing of upgrading to version 15 (I used latest version for both all client, server, schema, redis-driver... all are latest). At client side, I registered at
I used "changes" to have some specific logic, and it made me wrong :(. In the console.log I see changes includes of players (opposite with though it's on specific player (cause its callback in player.onChange) Ah, when I log, I see refId, I search on document and don't see doc mention about, can I using refId as a useful field to solve some business logic. Thank @endel and Community. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
HI @vinkent420, I've just documented this missing piece in the migration guide here: https://docs.colyseus.io/migrating/0.15/#on-schema-instances The You can use Please let me know if you have any thoughts or concerns about this change. Cheers! |
Beta Was this translation helpful? Give feedback.
HI @vinkent420, I've just documented this missing piece in the migration guide here: https://docs.colyseus.io/migrating/0.15/#on-schema-instances
The
changes
list is now officially deprecated and won't exist anymore🙌 colyseus/schema@7a99c3d
You can use
.listen()
to act on specific properties, which is how most people used to do looping through each of thechanges
anyway!Please let me know if you have any thoughts or concerns about this change. Cheers!