How can I get number of child in my firebase DB? using Unity

Hi I’m developer in south Korea.

I want to initialize objects same as number of child count in Firebase realtime DB.

But, I don’t know how…

So, I would ask you guys for helping me out…

If you have effective site or information, please tell me…

PS. English is not my first tongue so it can hard to understand… sorry.

I write my code like following thing.

public void FirebaseCount()
{
FirebaseApp.DefaultInstance.SetEditorDatabaseUrl(“my firebase DB URL”);
DatabaseReference reference = FirebaseDatabase.DefaultInstance.RootReference;
reference.GetValueAsync().ContinueWith(task =>
{
DataSnapshot snapshot = task.Result;
iCount = snapshot.ChildrenCount.ToString();
});
}

Is there any problems to check DB children count?

I think your problem is more related to the FireBase database than Unity? You should probably go ask the question on some forum or chat that focuses on that specific topic. Also please use code tags when you post code.

Thanks to your favor. I solved my problem as well.