Skip to content

Commit 4aaf266

Browse files
authored
docs: Fixing mermaid diagrams (#3961)
Fixing mermaid diagrams
1 parent 214c792 commit 4aaf266

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

com.unity.netcode.gameobjects/Documentation~/advanced-topics/network-update-loop-system/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ After injection, the player loops follows these stages. The player loop executes
2323

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

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

3838
| Stage | Method |
3939
| -- | -- |

com.unity.netcode.gameobjects/Documentation~/advanced-topics/networktime-ticks.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ Netcode for GameObjects (Netcode) uses a star topology. That means all communica
99
- `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.
1010
- `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.
1111

12-
13-
14-
<Mermaid chart={`
12+
```mermaid
1513
sequenceDiagram
1614
participant Owner as Client LocalTime
1715
participant Server as Server ServerTime & LocalTime
@@ -23,10 +21,7 @@ sequenceDiagram
2321
Note over Server: Send message to clients at LocalTime.
2422
Server->>Receiver: Delay when sending message
2523
Note over Receiver: Message arrives at ServerTime.
26-
`}/>
27-
28-
29-
24+
```
3025

3126
`LocalTime`
3227
- Use for player objects with client authority.
@@ -115,7 +110,7 @@ public class SyncedEventExample : NetworkBehaviour
115110
}
116111
```
117112

118-
<Mermaid chart={`
113+
```mermaid
119114
sequenceDiagram
120115
participant Owner as Owner
121116
participant Server as Server
@@ -133,7 +128,7 @@ sequenceDiagram
133128
Note over Receiver: StartCoroutine(WaitAndSpawnSyncedEffect(0.07))
134129
Receiver->>Receiver: WaitForSeconds(0.07);
135130
Note over Receiver: Instantiate effect at ServerTime = 10.0
136-
`}/>
131+
```
137132

138133
> [!NOTE]
139134
> 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.

0 commit comments

Comments
 (0)