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
Copy file name to clipboardExpand all lines: src/lib.rs
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -209,6 +209,8 @@ This behavior is also configurable via [client markers](#client-markers).
209
209
Some components depend on each other. For example, [`ChildOf`] and [`Children`]. You can enable
210
210
replication only for [`ChildOf`] and [`Children`] will be updated automatically on insertion.
211
211
212
+
You can also ensure that their mutations arrive in sync by using [`SyncRelatedAppExt::sync_related_entities`].
213
+
212
214
## Network events and triggers
213
215
214
216
This replaces RPCs (remote procedure calls) in other engines and,
@@ -549,9 +551,9 @@ All events, inserts, removals and despawns will be applied to clients in the sam
549
551
However, if you insert/mutate a component and immediately remove it, the client will only receive the removal because the component value
550
552
won't exist in the [`World`] during the replication process. But removal followed by insertion will work as expected since we buffer removals.
551
553
552
-
Entity component mutations are grouped by entity, and component groupings may be applied to clients in a different order than on the server.
554
+
Entity component mutations may be applied to clients in a different order than on the server.
553
555
For example, if two entities are spawned in tick 1 on the server and their components are mutated in tick 2,
554
-
then the client is guaranteed to see the spawns at the same time, but the component mutations may appear in different client ticks.
556
+
then the client is guaranteed to see the spawns at the same tick, but the component mutations may appear later (but not earlier).
555
557
556
558
If a component is dependent on other data, mutations to the component will only be applied to the client when that data has arrived.
557
559
So if your component references another entity, mutations to that component will only be applied when the referenced entity has been spawned on the client.
0 commit comments