FireStore Unity Getting Started

489 views
Skip to first unread message

Alex Ferrier

unread,
Mar 10, 2020, 6:49:23 PM3/10/20
to fireba...@googlegroups.com
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);

Kato Richardson

unread,
Mar 16, 2020, 11:19:50 AM3/16/20
to Firebase Google Group
Hi Alex,

image.png


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CAPQOqHjTpO2619Bf051s0PG1AsoDbo%2B-Ri63B5%2BQYJ%2BZLQQBGg%40mail.gmail.com.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Reply all
Reply to author
Forward
0 new messages