Hi,
I'm trying to try the advice I've been given, but I couldn't do much with Singleton and Dont destroy on load when I looked it up.
Let me ask you a question.
1, What should I set for Singleton's Reference?
2,At the time of game start-up, an FSM like the one shown in the picture was attached to an empty game object, is this correct?
By the way, I added the following C# script as an add component to the above "Firebase Dont destory Obj" empty object.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class StartUpObject : MonoBehaviour
{
void Awake()
{
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.
} else {
UnityEngine.Debug.LogError(System.String.Format(
"Could not resolve all Firebase dependencies: {0}", dependencyStatus));
// Firebase Unity SDK is not safe to use here.
}
});
}
}
Best regards.