var objGuid = CLR.Static("System.Guid").NewGuid();
имеет так же тип unknown, ГУИД генерится и его можно вывести в окне, но не преобразовывается в строку ни toSting-ом, ни ToString()-ом:using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Firebase;
using Firebase.Database;
using Firebase.Unity.Editor;
using UnityEngine.UI;
using System.Threading.Tasks;
public class DBManager : MonoBehaviour
{
private static DBManager ThisInstance = null;
public Text qText, btAnswer1, btAnswer2, btAnswer3, btAnswer4;
private string qtxt = null, btntxt1 = null, btntxt2 = null, btntxt3 = null, btntxt4 = null;
private int QuestionNumber;
void Awake() {
ThisInstance = this;
}
void Start() {
ReadQuestions();
}
void SetUIText() {
qText.text = qtxt;
btAnswer1.text = btntxt1;
btAnswer2.text = btntxt2;
btAnswer3.text = btntxt3;
btAnswer4.text = btntxt4;
}
void ReadQuestions() {
FirebaseDatabase.DefaultInstance.GetReference("questions/" + strCurrQuest).GetValueAsync().ContinueWith(task => {
if (task.IsFaulted) {
Debug.Log("Не могу прочитать базу данных");
}
else if (task.IsCompleted) {
DataSnapshot snapshot = task.Result;
qtxt = snapshot.Child("0").Value.ToString();
Debug.Log(qtxt);
btntxt1 = snapshot.Child("1").Value.ToString();
Debug.Log(btntxt1);
btntxt2 = snapshot.Child("2").Value.ToString();
Debug.Log(btntxt2);
btntxt3 = snapshot.Child("3").Value.ToString();
Debug.Log(btntxt3);
btntxt4 = snapshot.Child("4").Value.ToString();
Debug.Log(btntxt4);
}
});
}
}