NullReferenceException when using SteamP2P Transport
See original GitHub issueI am using the SteamP2P Transport and have a simple setup for a lobby in unity. When trying to join a hosted game as a client, after a few seconds a NullReferenceException gets thrown in the NetworkManager.cs, at line 1144:
MessagingSystem.ProcessIncomingMessageQueue();
Then the NetworkManager.Singleton.OnClientDisconnectCallback
is called, against what the NetworkManager.Singleton.OnClientConnectedCallback
never gets called (so the client never connects properly).
Here are two threads, where people describe the similar problems:
- https://answers.unity.com/questions/1869491/messagingsystemprocessincomingmessagequeue-nullref.html?childToView=1870613
- forum.unity.com/threads/anyone-have-sample-mlapi-with-steam-matchmaking.1098304/
I am using:
- Unity 2020.3.20f1
- Netcode for GameObjects 1.0.0-pre.3
- Multiplayer Tools 1.0.0-pre.2
- SteamP2P Transport for Netcode for GameObjects 2.0.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Anyone have Sample MLAPI with Steam Matchmaking?
Netcode, which is almost identical, but I keep getting a wierd NullReferenceException: Object reference not set to an instance of an object ......
Read more >NullReferenceException: Object reference not set to an ...
Having the same issue: Using Unitys netcode with the steamp2p transport, but i am not able to properly connect as a client. The...
Read more >Steamworks and Unity – P2P Multiplayer
It is a good start, but now let's go further and talk about multiplayer in Steam. This won't be a tutorial, but a...
Read more >c# - Getting a NullReferenceException when trying to ...
At line 29 (where targetEnemyUnit is instantiated) during game tests I get a NullReferenceException error which I figure means Instantiate ...
Read more >Trying to install custom Transports for Unity Netcode ...
Trying to install custom Transports for Unity Netcode for Gameobjects; (Steam P2P to be exact) The website on the Official documentation ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For the Photon based transport #118 was necessary after the latest change. There was a change to how the ids need to be passed in the connected and message events.
Hi @ElwoodHogan, did you ever manage to get it working? I’m having issues with Lobby not working properly with the Steam transport.