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/
66This is a collection of common mistakes:
77
88- [ ` NullReferenceException ` when trying to start a server/host/client] ( #err-001 )
9+ - [ ` NullReferenceException ` when trying to send an RPC to the server] ( #err-002 )
910
1011---
1112
@@ -28,3 +29,19 @@ NullReferenceException: Object reference not set to an instance of an object
2829
2930#### Solution
3031You 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