- Home /
Question by
Blacklister001 · Sep 15, 2018 at 10:17 AM ·
multiplayergoogle play gamesturn-based
Issue with GPGS TurnBased.CreateQuickMatch() in unity
In the main-menu I have a button that executes the below function:
public void AutoMatch()
{
const int MinOpponents = 2;
const int MaxOpponents = 7;
const int Variant = 0; // default
PlayGamesPlatform.Instance.TurnBased.CreateQuickMatch(MinOpponents, MaxOpponents,
Variant, OnMatchStarted);
}
void OnMatchStarted(bool success, TurnBasedMatch match) {
if (success) {
SceneManager.LoadScene ("GameScene");
} else {
//do nothing
}
}
Now even though I have set the MinOpponents value to 2. It still loads the gamescene upon button press. Meaning it creates a random match, with just one player that is the user itself. Why does it do that?
Should it not wait till another player also tries to create a quickmatch, and then load the gamescene?
Comment