fix: manage if one player did not send a propositon
This commit is contained in:
parent
a99f7dca5c
commit
5f0704c2f1
@ -16,7 +16,6 @@ public class PropositionHandler : MonoBehaviour
|
||||
|
||||
public void ShowQuestion(Question currentQuestion)
|
||||
{
|
||||
|
||||
List<Proposition> props = currentQuestion.propositions.Values.ToList();
|
||||
string enPrompt = prompts.GetPromptById(currentQuestion.promptId).en;
|
||||
promptLabel.text = enPrompt;
|
||||
@ -24,6 +23,12 @@ public void ShowQuestion(Question currentQuestion)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int index = i; // Capture la valeur de i pour cette itération
|
||||
if(props[i].photoUrl == null)
|
||||
{
|
||||
Debug.Log("One player did not send a proposition !", this);
|
||||
}
|
||||
else
|
||||
{
|
||||
StorageManager.ConvertGoogleStorageURLToHttpsUrl(props[i].photoUrl, _httpURL =>
|
||||
{
|
||||
StartCoroutine(StorageManager.DownloadImage_Coroutine(_httpURL, (Texture texture) =>
|
||||
@ -33,6 +38,7 @@ public void ShowQuestion(Question currentQuestion)
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user