Код: Выделить всё
using UnityEngine;
using Firebase;
using Firebase.Extensions;
using Firebase.AppCheck;
public class FirebaseInit : MonoBehaviour
{
public bool isDebugMode = false;
private const string debugToken = "xxxxxxxxxxxxxxxxxxxxxxx";
void Start()
{
if (isDebugMode)
{
DebugAppCheckProviderFactory.Instance.SetDebugToken(debugToken);
FirebaseAppCheck.SetAppCheckProviderFactory(DebugAppCheckProviderFactory.Instance);
} else
{
#if UNITY_ANDROID && !UNITY_EDITOR
FirebaseAppCheck.SetAppCheckProviderFactory(PlayIntegrityAppCheckProviderFactory.Instance);
#endif
}
FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(task =>
{
if (task.Result == DependencyStatus.Available)
{
Debug.Log(isDebugMode
? "Firebase + App Check initialisé avec Debug Provider"
: "Firebase initialisé (App Check par défaut – Play Integrity en prod)");
}
else
{
Debug.LogError("Firebase non initialisé : " + task.Result);
}
});
}
}
< /code>
И вот ошибка: < /p>
Assets\Scripts\FirebaseInit.cs(20,57): error CS0103: The name 'PlayIntegrityAppCheckProviderFactory' does not exist in the current context
Подробнее здесь: https://stackoverflow.com/questions/796 ... xist-in-th
Мобильная версия