Yay! Cloud Firestore bindings for Unity are here in Alpha.
There aren't yet any samples as far as I could see, so I added this to an existing app as the world's most naive Firestore test, this being a Unity-ized version of the first example here:
I thought this would work, but get an error "Unable to create converter for type UserData".
A quick glance through the reference doesn't seem to show a way to register converters (?? between object and json?) Can anyone explain what I misunderstood?
[System.Serializable]
public class UserData
{
public int x;
public int y;
public string name;
}
// Later on after FirebaseInit...
UserData userData = new UserData
{
x = 5,
y = 7,
name = "Joe Bloggs"
};
var write = await FirebaseFirestore.DefaultInstance.Collection("Users").AddAsync(userData);