fix(vote): questionID was converted to Quesiton object
This commit is contained in:
parent
c09b3fb8f0
commit
f01d2e4227
@ -6,6 +6,7 @@
|
||||
using Firebase.Extensions;
|
||||
using Newtonsoft.Json;
|
||||
using TMPro;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@ -509,7 +510,7 @@ public void onClickNewPlayers()
|
||||
|
||||
private void OnCurrentQuestionChanged(object sender, ValueChangedEventArgs onlineValue)
|
||||
{
|
||||
Question q = JsonConvert.DeserializeObject<Question>(onlineValue.Snapshot.GetRawJsonValue());
|
||||
Question q = myRoom.questions[onlineValue.Snapshot.Value.ConvertTo<int>()];
|
||||
|
||||
if (WaitingOtherPlayers.activeInHierarchy)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user