- Home /
Problems with Scene Change networking Unet
I'm working on setting up a multiplayer project and right now have many of the pieces seemingly working for the setup.
We are using the unity match system for hosting and joining sessions. Right now we have it to where the host will host a match, this is successful. Then the client can join the host's match via button interface.
new public void OnMatchJoined(JoinMatchResponse matchJoin){
if(matchJoin.success){
Debug.Log("Join match: success.");
Utility.SetAccessTokenForNetwork(matchJoin.networkId,new NetworkAccessToken(matchJoin.accessTokenString));
myClient = new NetworkClient();
myClient.RegisterHandler(MsgType.Connect,OnConnected);
myClient.RegisterHandler(MsgType.Error,OnError);
myClient.Connect(new MatchInfo(matchJoin));
}
else{
Debug.Log("Join match: failure.");
}
}
The Join Match success debug runs, but we're not getting a callback to OnConnected, until the Host player/server clicks the button to call ServerChangeScene. That runs on the host, but the client gets left behind and sometimes receives the error: "Unknown message ID 39 connId:1 UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()"
So I'm leaning towards something in the setup is wrong, prior to the scene change but I am new to Unet so not fully sure where I'm going wrong.
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
How to synchronize disable and enabling game objects over the network? 0 Answers
send data from client to local server 0 Answers
Clients can't spawn bullets, but the server does 1 Answer
UNET Multiplayer Lobby not creating an instance of the lobby player 1 Answer