Skip to content

Commit 08892f9

Browse files
committed
docs(website): Added a new "troubleshooting" section with "common mistakes" subsection
1 parent 0222c36 commit 08892f9

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

docs/_data/docs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,8 @@
3535
- custom-transports
3636
- network-profiler-window
3737
- custom-serialization
38-
- boxing-systems
38+
- boxing-systems
39+
40+
- title: Troubleshooting
41+
docs:
42+
- common-mistakes
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: Common Mistakes
3+
permalink: /wiki/common-mistakes/
4+
---
5+
6+
This is a collection of common mistakes:
7+
8+
- [`NullReferenceException` when trying to start a server/host/client](#err-001)
9+
10+
---
11+
12+
### <a name="err-001"></a>`NullReferenceException` when trying to start a server/host/client
13+
14+
#### Problem
15+
When trying to start a server, host, or client by executing one of these lines of code
16+
17+
```csharp
18+
NetworkingManager.Singleton.StartServer()
19+
NetworkingManager.Singleton.StartHost()
20+
NetworkingManager.Singleton.StartClient()
21+
```
22+
23+
the following exception is thrown:
24+
25+
```csharp
26+
NullReferenceException: Object reference not set to an instance of an object
27+
```
28+
29+
#### Solution
30+
You most likely forgot to add the `NetworkingManager` component to a game object in your scene.

0 commit comments

Comments
 (0)