-
Notifications
You must be signed in to change notification settings - Fork 1
Firebase Setup
Thomas Groechel edited this page Mar 22, 2021
·
16 revisions
- Open up MoveToCode Unity project if you have not already
- Download the Firebase zip folder from here and unzip the file.
- Navigate to
firebase_unity_sdk -> dotnet4
- Here you will need to just double click 2 unity packages of
FirebaseFirestore.unitypackage
andFirebaseStorage.unitypackage
. In order to build, you will also want to installFirebaseAuth.unitypackage
- Do not enable analystics and you can accept all proposed deletions of obsolete files
- You should be able to hit play now :)
- Include “Assets/Data” and “Assets/Firebase” into .gitignore if not there yet. This will ignore some Firebase files that are too large to be pushed to GitHub.
- If you are planning on using MoveToCode for your own purposes, create a new Firebase project here, 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. Note: It is not necessary to create a separate folder under Assets as long as the configuration files are under Assets.
- Reopen your Unity project to allow changes to execute.
- Download Firebase Unity SDK zip file from here and unzip the file.
- In Unity project, go to Assets->Import Package->Custom Package. Import any desired Firebase packages. This particular Unity project uses Firebase Storage from the 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 and replace them in the Assets folder.
- Make sure your project identifiers for your Firebase project correctly 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.