Doubt with Firebase

1

After hearing about Firebase, and reading about it, I decided it was a good idea to test its use in my Unity application.

I read the documentation, followed the configuration tutorials, and even set the authentication rules so that even unauthenticated users could include them in the database. I made the following code only for test reasons

void Start()
{
    // Set up the Editor before calling into the realtime database.
    FirebaseApp.DefaultInstance.SetEditorDatabaseUrl("https://magicast-bd2fc.firebaseio.com/");

    Firebase.Auth.FirebaseAuth.DefaultInstance.StateChanged += DefaultInstance_StateChanged;

    // Get the root reference location of the database.
    DatabaseReference reference = FirebaseDatabase.DefaultInstance.RootReference;

    var u = new User();
    u.email = "sdjkdsdksadjsad";
    u.fb_id = "sakdsajdhasd";
    u.username = "jadhsjahjsda";
    reference.SetValueAsync(u);
}

This code runs as soon as the Unity project is rolled, including drops on breakpoints.

However, when looking at the Firebase Console of my application, on the Database tab, there is nothing! And no error is presented to me in this code. I can not identify what I am doing wrong, and although this code is in C #, for Unity, I believe the Firebase logic is the same on all platforms, so all help is welcome.

Any tips? Maybe some configuration to make, or a small code to add

    
asked by anonymous 09.05.2017 / 17:24

0 answers