Closed keyserjaya closed 3 years ago
in the Firebase we were using, the syntax was
app = FirebaseApp.Create();
db = FirebaseDatabase.GetInstance(app);
db.SetPersistenceEnabled(true);
make sure to reuse the app
for other FireBase modules like auth and storage. they all have some static GetInstance(app)
syntax
Steps to reproduce:
Fix: For Editor only, use:
db = FirebaseFirestore.GetInstance(FirebaseApp.Create());
db.Settings.PersistenceEnabled = false;
instead ofdb = FirebaseFirestore.DefaultInstance;
Reference: https://github.com/firebase/quickstart-unity/issues/638