- Home /
Question by
parmardarshanv · Jan 16, 2020 at 12:48 PM ·
arraybooleandatabase
I want to store a boolean array on firebase.
I am making a game in which I have to store a boolean array to firebase databse. I have tried the following code: public class Player {
public string username;
public string nickname;
public bool[] checklistStore;
public Player() { }
public Player(string name, string nick, bool[] check)
{
username = name;
nickname = nick;
check = checklistStore;
}
}
public void saveData() { if(usernameIp.text.Equals("") && nicknameIp.text.Equals("")) { return; }
data = new Player(usernameIp.text, nicknameIp.text,VideoController.instant.checklist);
string jsonData = JsonUtility.ToJson(data);
databaseReference.Child("Users" + Random.Range(0, 1000000)).SetRawJsonValueAsync(jsonData);
}
The data saves and loads without any error, but nothing appears on the firebase databse. Can someone help me?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612221627im_/https://answers.unity.com/themes/thub/images/avi.jpg)