Cloud Storage: Firebase (optional)
For a comprehensive guide on integrating Firebase with Unity, developers are encouraged to consult the official Firebase documentation. What follows in this tutorial is a concise overview tailored to our specific use case.
Create a Firebase Project
Visit the Firebase Console.
Click on "Add Project" and follow the prompts to fill in the project information.

Click "Create Project".
Add an App
On the project overview page, click "Add App" and select the appropriate platform (e.g., Android).

Follow the prompts to enter the app's package name and other information.
Download and save the configuration file (
google-services.json) and place it in theAssetsfolder.
Install the SDK
Download Firebase Unity SDK
Import
FirebaseStorage.unitypackageinto Unity.
Add Storage
Go to
Build > Storage
Click Get Started and set up cloud storage

The highlighted part in the following image is the folder location where we will upload the anchor file.

Upload/download files
We've developed a dedicated FirebaseStorageManager class to facilitate file upload and download functionalities. For detailed implementation, you can refer to the official documentation.
Common Issues
After installing Firebase, building software in Unity may fail. This is a known issue with Android and requires adding
launcherTemplate.gradlein Unity, then adding the following content:
Possible error may occur:
In this case, you need to update the Google Play Service of the mobile phone.
Was this helpful?
