diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index f6b1fb4..c4e4450 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -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(onlineValue.Snapshot.GetRawJsonValue()); + Question q = myRoom.questions[onlineValue.Snapshot.Value.ConvertTo()]; if (WaitingOtherPlayers.activeInHierarchy) {