I’m using Unity MultiPlayer and MatchMaker.
How do I get error message or id in Unity MultiPlayer?
For example,
Someone makes the room with password, and next another player tries to join that private room with invalid password.
Of course it could’t join the room.
Then I can get the error string as below via OnMatchJoined(Boolean success,String extendedInfo,MatchInfo matchInfo) of extendedInfo.
failed unity_JoinMatch for appId=2530653, serverId=InvalidFormatException:[System.FormatException: FAILURE Returned from server: failed unity_JoinMatch for appId=2530653, serverId=Invalid
at UnityEngine.Networking.Match.Response.Parse (System.Object obj) [0x00051] in C:\buildslave\unity\build\Runtime\Networking\Managed\UNETInterface.cs:222
at UnityEngine.Networking.Match.JoinMatchResponse.Parse (System.Object obj) [0x00003] in C:\buildslave\unity\build\Runtime\Networking\Managed\UNETInterface.cs:426
at UnityEngine.Networking.Match.NetworkMatch+c__Iterator02[UnityEngine.Networking.Match.JoinMatchResponse,UnityEngine.Networking.Match.NetworkMatch+DataResponseDelegate
1[UnityEngine.Networking.Match.MatchInfo]].MoveNext () [0x00097] in C:\buildslave\unity\build\Runtime\Networking\Managed\MatchMakingClient.cs:410 ]
UnityEngine.Debug:Log(Object)
However, This is too difficult to understand for users.
I think that display following message is better than above long long difficult message.
“Failed join room, it does not match password.”
But, Currently I can only get result (success or failed) via OnMatchXXX callback.
It is not been determined connection failed reason then, So I can’t display Easy-to-understand message.
(Possibly it occurs another network connection error. e.g serverdown )
Then, If Possible I get network error id. or Easy-to-understand error message.
Is there a any ideas?
Thanks