Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

210
Views
Checking whether Firebase is initialized successfully in Unity3D?

I've got a Unity application with Firebase integration, and I'd like to handle the case when I have to shut down the Firebase project for various reasons.

So the application will still function relatively normally, slightly differently.

I tried simulating this by messing up the project_id in the google-services.json.

But it didn't cause any errors, the firebase calls are just aren't executed.

Is there a way to check whether the Firebase initialisation is successful or not?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Yes it is, if you are using Firebase admin SDK on your app you can check it with:

using System;
using System.Threading.Tasks;
using UnityEngine;
using Firebase;

public class FirebaseController : MonoBehaviour
{
    public async Task InitializeFirebase()
    {
        await FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(task =>
        {
            if (task.Result == DependencyStatus.Available)
            {
                Debug.Log("Firebase correctly Initialized");
            }
            else
            {
                Debug.Log("Could not resolve all Firebase dependencies: " + task.Result);
            }
        });
    }
}
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!