Can't recreate a match using UNET matchmaker
I'm creating a match using the matchmaker from the network manager and destroying it using
`MultiplayerNetworkManager.singleton.matchMaker.DestroyMatch`
but after tying to create another match I get the error
Local Connection already exists
UnityEngine.Networking.NetworkManager:OnMatchCreate(CreateMatchResponse)
Game.Multiplayer.MultiplayerNetworkManager:OnMatchCreate(CreateMatchResponse) (at Assets/Game/Multiplayer/Scripts/MultiplayerNetworkManager.cs:170)
MultiplayerInteractor:OnMatchCreated(CreateMatchResponse) (at Assets/Game/Multiplayer/UI/Scripts/MultiplayerInteractor.cs:119)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
A connection has already been set as ready. There can only be one.
UnityEngine.Networking.NetworkManager:OnClientConnect(NetworkConnection)
Game.Multiplayer.MultiplayerNetworkManager:OnClientConnect(NetworkConnection) (at Assets/Game/Multiplayer/Scripts/MultiplayerNetworkManager.cs:143)
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()
Do I need to call something else before trying to create another match?
I'm using unity 5.3.5p5 due to some project constraints.
Also I'm overriding the functions in my NetworkManager just to print some logs they're not modified
I just ran into this issue. @jeffom did you ever find a solution? I read that match$$anonymous$$aker.DropConnection() is more-recommended, however I get the same err. Epic bump!
I'm using 5.5.0f3 - found this post via Google
EDIT: Originally thought this was the answer, but nope, not the answer.
In your LobbyPlayer script, add the if (!readyToBegin). I saw other threads where they reverse engineered this and realized it's just simply a log warning (that you could probably even ignore) saying you readied up 2x somehow/somewhere. So:
if (!readyToBegin)
SendReadyToBegin$$anonymous$$essage();
Ref: http://answers.unity3d.com/questions/991552/unet-a-connection-has-already-been-set-as-ready-th.html
Answer by Jeffom · Dec 11, 2016 at 03:53 AM
Not sure if you already solved it, In my case i needed to call the StopMatchmaker and Start it again before trying to recreate a match.
I hope this works for you. Good Luck
Your answer
Follow this Question
Related Questions
Is there any way to do automatic p2p matchmaking system via Unet? 0 Answers
Unity Unet own Matchmaking 2 Answers
uNet: Failed to send internal buffer 0 Answers
UNET with Secure Firewalls 0 Answers
How to spawn projectiles on the server from a client. 0 Answers