File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
docs/_docs/troubleshooting Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ permalink: /wiki/common-mistakes/
6
6
This is a collection of common mistakes:
7
7
8
8
- [ ` NullReferenceException ` when trying to start a server/host/client] ( #err-001 )
9
+ - [ ` NullReferenceException ` when trying to send an RPC to the server] ( #err-002 )
9
10
10
11
---
11
12
@@ -28,3 +29,19 @@ NullReferenceException: Object reference not set to an instance of an object
28
29
29
30
#### Solution
30
31
You most likely forgot to add the ` NetworkingManager ` component to a game object in your scene.
32
+
33
+ ---
34
+
35
+ ### <a name =" err-002 " ></a >` NullReferenceException ` when trying to send an RPC to the server
36
+
37
+ #### Problem
38
+ When the client tries to run ` InvokeServerRpc ` , the following exception is thrown:
39
+
40
+ ``` csharp
41
+ NullReferenceException : Object reference not set to an instance of an object
42
+ ```
43
+
44
+ #### Solution
45
+ You most likely forgot to ` Spawn() ` your object.
46
+
47
+ Run ` Spawn() ` on your ` NetworkedObject ` component as the server to fix this issue.
You can’t perform that action at this time.
0 commit comments