Merge branch 'main' of github.com:LeGall29/GGJ2024
This commit is contained in:
commit
a5b2c1032b
46
Assets/Scripts/FirebaseInitializer.cs
Normal file
46
Assets/Scripts/FirebaseInitializer.cs
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
using Firebase;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Events;
|
||||||
|
|
||||||
|
public class FirebaseInitializer : MonoBehaviour
|
||||||
|
{
|
||||||
|
public UnityEvent onFirebaseReady;
|
||||||
|
public static FirebaseInitializer Instance;
|
||||||
|
|
||||||
|
void Awake()
|
||||||
|
{
|
||||||
|
Instance = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
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.
|
||||||
|
var app = Firebase.FirebaseApp.DefaultInstance;
|
||||||
|
onFirebaseReady?.Invoke();
|
||||||
|
|
||||||
|
// Set a flag here to indicate whether Firebase is ready to use by your app.
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError(System.String.Format(
|
||||||
|
"Could not resolve all Firebase dependencies: {0}", dependencyStatus));
|
||||||
|
// Firebase Unity SDK is not safe to use here.
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
11
Assets/Scripts/FirebaseInitializer.cs.meta
Normal file
11
Assets/Scripts/FirebaseInitializer.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 153bd176c0ad8f82692512264f5245ba
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -4,6 +4,7 @@
|
|||||||
"com.unity.feature.development": "1.0.1",
|
"com.unity.feature.development": "1.0.1",
|
||||||
"com.unity.textmeshpro": "3.0.6",
|
"com.unity.textmeshpro": "3.0.6",
|
||||||
"com.unity.timeline": "1.7.6",
|
"com.unity.timeline": "1.7.6",
|
||||||
|
"com.unity.toolchain.linux-x86_64": "2.0.6",
|
||||||
"com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.6",
|
"com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.6",
|
||||||
"com.unity.ugui": "1.0.0",
|
"com.unity.ugui": "1.0.0",
|
||||||
"com.unity.visualscripting": "1.9.1",
|
"com.unity.visualscripting": "1.9.1",
|
||||||
|
@ -132,6 +132,16 @@
|
|||||||
},
|
},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
|
"com.unity.toolchain.linux-x86_64": {
|
||||||
|
"version": "2.0.6",
|
||||||
|
"depth": 0,
|
||||||
|
"source": "registry",
|
||||||
|
"dependencies": {
|
||||||
|
"com.unity.sysroot": "2.0.7",
|
||||||
|
"com.unity.sysroot.linux-x86_64": "2.0.6"
|
||||||
|
},
|
||||||
|
"url": "https://packages.unity.com"
|
||||||
|
},
|
||||||
"com.unity.toolchain.win-x86_64-linux-x86_64": {
|
"com.unity.toolchain.win-x86_64-linux-x86_64": {
|
||||||
"version": "2.0.6",
|
"version": "2.0.6",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<projectSettings>
|
<projectSettings>
|
||||||
<projectSetting name="com.google.external-dependency-managerAnalyticsEnabled" value="False" />
|
|
||||||
<projectSetting name="com.google.firebaseAnalyticsEnabled" value="False" />
|
|
||||||
<projectSetting name="Google.IOSResolver.VerboseLoggingEnabled" value="False" />
|
<projectSetting name="Google.IOSResolver.VerboseLoggingEnabled" value="False" />
|
||||||
<projectSetting name="Google.PackageManagerResolver.VerboseLoggingEnabled" value="False" />
|
<projectSetting name="Google.PackageManagerResolver.VerboseLoggingEnabled" value="False" />
|
||||||
<projectSetting name="Google.VersionHandler.VerboseLoggingEnabled" value="False" />
|
<projectSetting name="Google.VersionHandler.VerboseLoggingEnabled" value="False" />
|
||||||
|
Loading…
Reference in New Issue
Block a user