I'm getting really frustrated with Firebase devs who close my questions just because they don't contain minimum reproducible code. This is a valid question and there are useful answers out there.
My Firebase app works in the editor, and it works in build, but when I try to run both at the same time, the second instance crashes once the first Firebase command is invoked (firestore snapshot).
I suspect that I may need to create a firebase instance with a different name, but I'm not sure how. Right now the two instances both use Firebase.DefaultInstance.
The crash gives no errors, and the editor logs show everything runs fine until
Query q = db.Collection("matches").OrderByDescending("players");
QuerySnapshot snapSht = await q.GetSnapshotAsync();
How do I run a second Unity-Firebase instance on a single local machine for multiplayer testing?
Steps to reproduce problem:
- Install and set up firebase in Unity per the documentation
- Initialize the app and fetch a snapshot from Firestore
- Build and run the app
- While build is running, press play in Unity Editor. Once the snapshot code runs, Unity will crash.
- If Editor is run first, the build will be the one to crash