Skip to content

Commit 5a9c22f

Browse files
Upgrades to Docusaurus v2.4 (#994)
Co-authored-by: s-omeilia-unity <[email protected]>
1 parent 724166b commit 5a9c22f

File tree

79 files changed

+5531
-9234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+5531
-9234
lines changed

.eslint.rc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["plugin:@docusaurus/recommended"]
3+
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The documentation site is built using [Docusaurus 2](https://v2.docusaurus.io/)
1010

1111
## Contributing Content
1212

13-
Always cut branches from **master** branch.
13+
Always cut branches from **main** branch.
1414

1515
See the [Contribution Guide](https://github.com/Unity-Technologies/com.unity.multiplayer.docs/wiki) to learn about writing and submitting content, our GitHub labels, and more. A [template file](https://github.com/Unity-Technologies/com.unity.multiplayer.docs/blob/master/docs/template.md) (/docs/template.md) is included in the repo to understand markdown formatting and options.
1616

babel.config.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
module.exports = {
2-
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3-
plugins: [
4-
'@babel/plugin-transform-modules-commonjs'
5-
]
2+
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
63
};

config/admonitions.config.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//Admonitions component is swizzled (wrapped) to implement custom types and icons. See `src/theme/Admonitions/index.js` for implementations details.
2+
const admonitions = {
3+
tag: ":::",
4+
keywords: [
5+
"contribution", // custom
6+
"funfact", // custom
7+
"bestpractice", // custom
8+
"faq", // custom
9+
"unity", // custom
10+
11+
"caution", // built-in
12+
"note", // built-in
13+
"tip", // built-in
14+
"danger", //built-in
15+
"info", // built-in
16+
17+
// "secondary", // deprecated, not used
18+
// "success", // deprecated, not used
19+
"warning", // deprecated, but in use
20+
"important", // deprecated, but in use
21+
],
22+
};
23+
24+
module.exports = admonitions;

config/i18n.config.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const i18n = {
2+
defaultLocale: "en",
3+
locales: ["en"],
4+
localeConfigs: {
5+
en: {
6+
htmlLang: "en-US",
7+
},
8+
},
9+
};
10+
11+
module.exports = i18n;

config/scripts.config.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const scripts = [
2+
{
3+
//OneTrust Cookie required by Unity web team
4+
src: "https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",
5+
async: true,
6+
"data-domain-script": "6e91be4c-3145-4ea2-aa64-89d716064836",
7+
},
8+
//todo: GTM implementation that relates to OT and user data tracking
9+
];
10+
11+
module.exports = scripts;

docs/about.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Netcode for GameObjects (Netcode) is a high-level networking library built for U
88

99
To learn more about Netcode for GameObjects functionality and capabilities, explore the content below:
1010

11-
<div class="table-columns-plain" >
11+
<div className="table-columns-plain" >
1212

1313
| Getting Started | Hello World and Golden Paths | Education and Samples |
1414
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1515
| [Install Unity Netcode](installation/installation.md)<br/>[Migration from UNet to Netcode](installation/migratingfromUNet.md)<br/>[Upgrade to Unity Netcode Package](installation/migratingfrommlapi.md) | [Get started with Netcode](../docs/tutorials/get-started-with-ngo.md) | [Boss Room](learn/bossroom/getting-started-boss-room.md)<br/>[Bite Size Samples](learn/bitesize/bitesize-introduction.md)<br/>[Dilmer's Tutorials](learn/dilmer/dilmer-video.md) |
1616

1717
</div>
1818

19-
<div class="table-columns-plain" >
19+
<div className="table-columns-plain" >
2020

2121
| Core Concepts | Debugging | Terminology and FAQs |
2222
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |

docs/advanced-topics/message-system/clientrpc.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Servers can invoke a ClientRpc to execute on all clients.
99

1010
<figure>
1111
<ImageSwitcher
12-
lightImageSrc="/img/sequence_diagrams/RPCs/ClientRPCs.png?text=LightMode"
13-
darkImageSrc="/img/sequence_diagrams/RPCs/ClientRPCs_Dark.png?text=DarkMode"/>
12+
lightImageSrc="/sequence_diagrams/RPCs/ClientRPCs.png?text=LightMode"
13+
darkImageSrc="/sequence_diagrams/RPCs/ClientRPCs_Dark.png?text=DarkMode"/>
1414
</figure>
1515

1616

@@ -98,8 +98,8 @@ private void DoSomethingServerSide(int clientId)
9898

9999
<figure>
100100
<ImageSwitcher
101-
lightImageSrc="/img/sequence_diagrams/RPCs/ClientRPCs_CertainClients.png?text=LightMode"
102-
darkImageSrc="/img/sequence_diagrams/RPCs/ClientRPCs_CertainClients_Dark.png?text=DarkMode"/>
101+
lightImageSrc="/sequence_diagrams/RPCs/ClientRPCs_CertainClients.png?text=LightMode"
102+
darkImageSrc="/sequence_diagrams/RPCs/ClientRPCs_CertainClients_Dark.png?text=DarkMode"/>
103103
<figcaption>Server can invoke a client RPC on a Network Object. The RPC will be placed in the local queue and then sent to a selection of clients (by default this selection is "all clients"). When received by a client, RPC will be executed on the client's version of the same Network Object.</figcaption>
104104
</figure>
105105

@@ -110,8 +110,8 @@ The host is both a client and a server. If a host invokes a client RPC, it trigg
110110

111111
<figure>
112112
<ImageSwitcher
113-
lightImageSrc="/img/sequence_diagrams/RPCs/ClientRPCs_ClientHosts_CalledByClientHost.png?text=LightMode"
114-
darkImageSrc="/img/sequence_diagrams/RPCs/ClientRPCs_ClientHosts_CalledByClientHost_Dark.png?text=DarkMode"/>
113+
lightImageSrc="/sequence_diagrams/RPCs/ClientRPCs_ClientHosts_CalledByClientHost.png?text=LightMode"
114+
darkImageSrc="/sequence_diagrams/RPCs/ClientRPCs_ClientHosts_CalledByClientHost_Dark.png?text=DarkMode"/>
115115
<figcaption>Hosts can invoke client RPCs on `NetworkObjects`. If broadcasting to all clients, the RPC will be immediately invoked on the host and placed in the local queue. At the end of the frame, the client RPC will be sent to the remote clients. When a remote client receives the client RPC it's executed on the client's local cloned instance of the same `NetworkObject`.</figcaption>
116116
</figure>
117117

docs/advanced-topics/message-system/execution-table.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -63,35 +63,35 @@ void MyServerRpc(int somenumber, string somestring)
6363

6464
<figure>
6565
<ImageSwitcher
66-
lightImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs.png?text=LightMode"
67-
darkImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs_Dark.png?text=DarkMode"/>
66+
lightImageSrc="/sequence_diagrams/RPCs/ServerRPCs.png?text=LightMode"
67+
darkImageSrc="/sequence_diagrams/RPCs/ServerRPCs_Dark.png?text=DarkMode"/>
6868
<figcaption>Client can invoke a server RPC on a Network Object. The RPC will be placed in the local queue and then sent to the server, where it will be executed on the server version of the same Network Object.</figcaption>
6969
</figure>
7070

7171
<figure>
7272
<ImageSwitcher
73-
lightImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClient.png?text=LightMode"
74-
darkImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClient_Dark.png?text=DarkMode"/>
73+
lightImageSrc="/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClient.png?text=LightMode"
74+
darkImageSrc="/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClient_Dark.png?text=DarkMode"/>
7575
<figcaption>Clients can invoke server RPCs on Client Hosts the same way they can invoke server RPCs on the regular servers: the RPC will be placed in the local queue and then sent to the Client Host, where it will be executed on the Client Host's version of the same Network Object.</figcaption>
7676
</figure>
7777

7878

7979
<figure>
8080
<ImageSwitcher
81-
lightImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClientHost.png?text=LightMode"
82-
darkImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClientHost_Dark.png?text=DarkMode"/>
81+
lightImageSrc="/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClientHost.png?text=LightMode"
82+
darkImageSrc="/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClientHost_Dark.png?text=DarkMode"/>
8383
<figcaption>When a server RPC is invoked by the Client Host, the RPC will be placed in a local queue and then executed on the Client Host after a short delay. The same happens for pure servers.</figcaption>
8484
</figure>
8585

8686
<figure>
8787
<ImageSwitcher
88-
lightImageSrc="/img/sequence_diagrams/RPCs/ClientRPCs.png?text=LightMode"
89-
darkImageSrc="/img/sequence_diagrams/RPCs/ClientRPCs_Dark.png?text=DarkMode"/>
88+
lightImageSrc="/sequence_diagrams/RPCs/ClientRPCs.png?text=LightMode"
89+
darkImageSrc="/sequence_diagrams/RPCs/ClientRPCs_Dark.png?text=DarkMode"/>
9090
</figure>
9191

9292
<figure>
9393
<ImageSwitcher
94-
lightImageSrc="/img/sequence_diagrams/RPCs/ClientRPCs_ClientHosts_CalledByClientHost.png?text=LightMode"
95-
darkImageSrc="/img/sequence_diagrams/RPCs/ClientRPCs_ClientHosts_CalledByClientHost_Dark.png?text=DarkMode"/>
94+
lightImageSrc="/sequence_diagrams/RPCs/ClientRPCs_ClientHosts_CalledByClientHost.png?text=LightMode"
95+
darkImageSrc="/sequence_diagrams/RPCs/ClientRPCs_ClientHosts_CalledByClientHost_Dark.png?text=DarkMode"/>
9696
<figcaption>Client Hosts can invoke Client RPCs on Network Objects. The RPC will be placed in the local queue and then, after a short delay the client RPC will be executed on the Client Host, and sent to the other clients. When client RPC is received by the client - it's executed on the Client's version of the same Network Object.</figcaption>
9797
</figure>

docs/advanced-topics/message-system/serverrpc.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -131,22 +131,22 @@ The following are a few timing diagrams to help provide additional visual contex
131131

132132
<figure>
133133
<ImageSwitcher
134-
lightImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs.png?text=LightMode"
135-
darkImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs_Dark.png?text=DarkMode"/>
134+
lightImageSrc="/sequence_diagrams/RPCs/ServerRPCs.png?text=LightMode"
135+
darkImageSrc="/sequence_diagrams/RPCs/ServerRPCs_Dark.png?text=DarkMode"/>
136136
<figcaption>A Client can invoke a server RPC on a `NetworkObject`. The RPC will be placed in the local queue and then sent to the server at the end of the frame. Upon receiving the server RPC, it's executed on the Server's instance of the same `NetworkObject`.</figcaption>
137137
</figure>
138138

139139
<figure>
140140
<ImageSwitcher
141-
lightImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClient.png?text=LightMode"
142-
darkImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClient_Dark.png?text=DarkMode"/>
141+
lightImageSrc="/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClient.png?text=LightMode"
142+
darkImageSrc="/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClient_Dark.png?text=DarkMode"/>
143143
<figcaption>Clients can invoke server RPCs on Hosts exactly like they can on a Server: the RPC will be placed in the local queue and sent to the Host at the end of the frame. Upon receiving the server RPC, it will be executed on the Host's instance of the same `NetworkObject`.</figcaption>
144144
</figure>
145145

146146
<figure>
147147
<ImageSwitcher
148-
lightImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClientHost.png?text=LightMode"
149-
darkImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClientHost_Dark.png?text=DarkMode"/>
148+
lightImageSrc="/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClientHost.png?text=LightMode"
149+
darkImageSrc="/sequence_diagrams/RPCs/ServerRPCs_ClientHosts_CalledByClientHost_Dark.png?text=DarkMode"/>
150150
<figcaption>When a server RPC is invoked by a Host, the RPC is immediately executed.</figcaption>
151151
</figure>
152152

docs/advanced-topics/messaging-system.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ The concept of an `RPC` is common not only in video games but in the software in
1313

1414
<figure>
1515
<ImageSwitcher
16-
lightImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs.png?text=LightMode"
17-
darkImageSrc="/img/sequence_diagrams/RPCs/ServerRPCs_Dark.png?text=DarkMode"/>
16+
lightImageSrc="/sequence_diagrams/RPCs/ServerRPCs.png?text=LightMode"
17+
darkImageSrc="/sequence_diagrams/RPCs/ServerRPCs_Dark.png?text=DarkMode"/>
1818
<figcaption>Client can invoke a server RPC on a Network Object. The RPC will be placed in the local queue and then sent to the server, where it will be executed on the server version of the same Network Object.</figcaption>
1919
</figure>
2020

@@ -28,8 +28,8 @@ Netcode has two variations of RPCs to execute logic on either server-side or cli
2828

2929
<figure>
3030
<ImageSwitcher
31-
lightImageSrc="/img/sequence_diagrams/RPCs/ClientRPCs.png?text=LightMode"
32-
darkImageSrc="/img/sequence_diagrams/RPCs/ClientRPCs_Dark.png?text=DarkMode"/>
31+
lightImageSrc="/sequence_diagrams/RPCs/ClientRPCs.png?text=LightMode"
32+
darkImageSrc="/sequence_diagrams/RPCs/ClientRPCs_Dark.png?text=DarkMode"/>
3333
<figcaption>Server can invoke a client RPC on a Network Object. The RPC will be placed in the local queue and then sent to a selection of clients (by default this selection is "all clients"). When received by a client, RPC will be executed on the client's version of the same Network Object.</figcaption>
3434
</figure>
3535

0 commit comments

Comments
 (0)