Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ After injection, the player loops follows these stages. The player loop executes

In all `NetworkUpdateStages`, it iterates over an array and calls the `NetworkUpdate` method over `INetworkUpdateSystem` interface, and the pattern is repeated.

<Mermaid chart={`
```mermaid
graph LR;
A(Initialization)
B(EarlyUpdate)
Expand All @@ -33,7 +33,7 @@ In all `NetworkUpdateStages`, it iterates over an array and calls the `NetworkUp
F(PreLateUpdate)
G(PostLateUpdate)
A --> B --> C --> D --> E --> F --> G
`}/>
```

| Stage | Method |
| -- | -- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ Netcode for GameObjects (Netcode) uses a star topology. That means all communica
- `LocalTime` on a client is ahead of the server. If a server RPC is sent at `LocalTime` from a client it will roughly arrive at `ServerTime` on the server.
- `ServerTime` on clients is behind the server. If a client RPC is sent at `ServerTime` from the server to clients it will roughly arrive at `ServerTime` on the clients.



<Mermaid chart={`
```mermaid
sequenceDiagram
participant Owner as Client LocalTime
participant Server as Server ServerTime & LocalTime
Expand All @@ -23,10 +21,7 @@ sequenceDiagram
Note over Server: Send message to clients at LocalTime.
Server->>Receiver: Delay when sending message
Note over Receiver: Message arrives at ServerTime.
`}/>



```

`LocalTime`
- Use for player objects with client authority.
Expand Down Expand Up @@ -115,7 +110,7 @@ public class SyncedEventExample : NetworkBehaviour
}
```

<Mermaid chart={`
```mermaid
sequenceDiagram
participant Owner as Owner
participant Server as Server
Expand All @@ -133,7 +128,7 @@ sequenceDiagram
Note over Receiver: StartCoroutine(WaitAndSpawnSyncedEffect(0.07))
Receiver->>Receiver: WaitForSeconds(0.07);
Note over Receiver: Instantiate effect at ServerTime = 10.0
`}/>
```

> [!NOTE]
> Some components such as NetworkTransform add additional buffering. When trying to align an RPC event like in this example, an additional delay would need to be added.
Expand Down