Initialer Upload neues Unity-Projekt
This commit is contained in:
@ -0,0 +1,32 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
|
||||
public class StartCrashlytics : MonoBehaviour
|
||||
{
|
||||
#if OVR_SAMPLES_ENABLE_FIREBASE
|
||||
Firebase.FirebaseApp app;
|
||||
void Start()
|
||||
{
|
||||
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.
|
||||
Firebase.Crashlytics.Crashlytics.IsCrashlyticsCollectionEnabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.LogError(System.String.Format(
|
||||
"Could not resolve all Firebase dependencies: {0}", dependencyStatus));
|
||||
// Firebase Unity SDK is not safe to use here.
|
||||
}
|
||||
});
|
||||
}
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user