multiplayer-community-contributions: NullReferenceException when using SteamP2P Transport

I 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:

  1. https://answers.unity.com/questions/1869491/messagingsystemprocessincomingmessagequeue-nullref.html?childToView=1870613
  2. 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

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted 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.