Proper way to install Firebase packages in Unity and commit them to Git

Currently, I am trying to install some packages for integration with Firebase, more specifically, Authentication, Crashlytics, and their dependencies (External Dependency Manager and Firebase Core).

I was trying to use the Package Manager option described in their docs, but the problem with tarballs is that they keep pointing to an absolute path on my machine. There is already a solution proposed for this , but it requires me to put the tarballs inside the project, and commit them as well. However, one of the tarballs, com.google.firebase.app, already has 83 MB, so this file is too big to be included in version control.

So, what is the best way to import these packages to Unity without putting a bunch of big files in version control?

Hello,

While not the only way to handle this, a common solution is to not version-control packages and instead have each client install them themselves. Example .gitignores demonstrate this flow. This saves space in your repo and because this is only done as part of project setup, its not that much work over the course of a project. Additionally, the setup pictured at that link also allows your team to each choose how they want to bring in Firebase packages because no particular method will be in your version control.

Alternatively, if you are using git, have you considered combining relatively pathed packages with git large file storage? Gitlfs brings the file size limit from 50MB to 5GB which would place the file firmly within the limits.

1 Like

In the end, I implemented the requests through UnityWebRequest. But thanks for the suggestion.

Another option is the GameWorkstore stuff on GitHub. Like GitHub - GameWorkstore/com.google.firebase.crashlytics: Wrapper over original package distribution. This repository replicates the licence terms of his original distribution location. For more information check https://firebase.google.com/terms and https://firebase.google.com/support/release-notes/unity. We’ve been using that for some time and it’s been great to be able to just use Unity packages despite Google’s refusal to keep their UPM stuff going.

1 Like

Yeah I wish Google would just sign up for verified solutions provider, since it has different terms and they’d be able to provide through the Unity Registries directly, or have a scoped package registry like what Meta did for the xr packages.