Не удалось прочитать параметры Firebase из ресурсов приложения. Убедитесь, что
включен google-services.json в вашу сборку, или укажите параметры
напрямую
У меня уже есть файл google-services.json в папке «Ресурсы», и я добавил следующий блок кода, как предложено здесь (https://firebase.google.com/docs/unity/setup):
Код: Выделить всё
private void ConfirmGooglePlayerServicesRequirements()
{
Firebase.FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => {
var dependencyStatus = task.Result;
if (dependencyStatus == Firebase.DependencyStatus.Available)
{
// Create and hold a reference to your FirebaseApp,
// where app is a Firebase.FirebaseApp property of your application class.
app = Firebase.FirebaseApp.DefaultInstance;
// Set a flag here to indicate whether Firebase is ready to use by your app.
firebaseIsReadyToBeUsed = true;
}
else
{
Debug.LogError(System.String.Format(
"Could not resolve all Firebase dependencies: {0}", dependencyStatus));
// Firebase Unity SDK is not safe to use here.
}
});
}
Подробнее здесь: https://stackoverflow.com/questions/590 ... -resources