-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Karen Ly edited this page Feb 15, 2021
·
5 revisions
- Add “Assets/Data” and “Assets/Firebase” into .gitignore if not there yet.
- Create a Firebase project, following the given steps on the Firebase console.
- Import the SDK setup and configuration files, google-services.json for Android and GoogleService-Info.plist for iOS, into your Unity Assets folder. Create a Data folder under Assets and place the two files there.
- Reopen your Unity project to allow changes to execute.
- Download Firebase Unity SDK zip file from here Step 4 and unzip the file.
- In Unity project, Assets->Import Package->Custom Package. Import any desired Firebase packages. This particular project uses Firebase Storage from dotnet4 folder.
- If prompted, enable Analytics for External Dependency Manager.
- If you receive the error "Generation of the Firebase Android resource file google-services.xml from Assets/Data/GoogleService-Info.plist failed," go to your Firebase project and create a Realtime Database. Reimport the google-services.json and GoogleService-Info.plist files by downloading them again from the Firebase console.
- Make sure your project identifiers for your Firebase project matches your bundle identifiers for iOS and Android on Unity.
- When pushing to GitHub, if you receive an error about large files and potentially not being able to commit further changes, make sure you have added Firebase to .gitignore. It is also suggested to .gitignore your configuration files if you want others to set up their own Firebase project to host its configuration and data.