From f01d2e42279a431ecef7295babf8aeec16d76128 Mon Sep 17 00:00:00 2001 From: Fangh Date: Sun, 28 Jan 2024 22:57:43 +0100 Subject: [PATCH] fix(vote): questionID was converted to Quesiton object --- Assets/Scripts/GameManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {