I call in a coroutine NetworkMatch.ListMatches : I obtain the list of match.
I relaunch it just after (to maintain the list of availables matches in a displayed list) : there is no match.
When you obtain a match via this function : the match is no more valid in the responses on future call … ?
I have no solution, and it’s terribly blocking for my project.
Code
/// <summary>
/// Stop listening for match. Stop a coroutine for that.
/// </summary>
public void StopListMatch()
{
StopCoroutine(listMatchCoroutine);
listMatch = false;
}
/// <summary>
/// Search match and fill m_matcheAvailables
/// </summary>
/// <param name="withPrivateMatch"></param>
/// <param name="maxPageSize"></param>
IEnumerator ListMatchCoroutine(bool withPrivateMatch = true, int maxPageSize = 10)
{
while (listMatch)
{
yield return matchMaker.ListMatches(0, maxPageSize, "", withPrivateMatch, 0, version, ListMatchResponse);
}
}
private void ListMatchResponse(bool success, string extendedInfo, List<MatchInfoSnapshot> responses)
{
m_matchAvailables = responses;
}