-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Make a way to sign in to different firebase accounts on clones #98
Comments
At the start of the game do something like: if the productName is different from the original, Unity will use different save data. |
Thanks @arkms, |
tried this method, FireBase still crashed. worth noting I have problem with the guest login feature. using ParrelSync;
using UnityEditor;
using UnityEngine;
[DefaultExecutionOrder(-100)]
[DisallowMultipleComponent]
class EditorProductNameChanger : MonoBehaviour
{
const string ProductNameFormat = "{0}{1}";
static bool s_changed = false;
#if UNITY_EDITOR
void Awake()
{
if (ClonesManager.IsClone() && !s_changed)
{
PlayerSettings.productName = string.Format(ProductNameFormat, PlayerSettings.productName, ClonesManager.GetArgument());
Debug.LogFormat("<color=green>Changed product name to \"{0}\"</color>", PlayerSettings.productName);
}
s_changed = true;
Destroy(this);
}
#endif
} |
I ended up building for Linux and using WSL with multiple users, each with one instance. |
We have solved this by changing the name passed in when creating or getting a firebase app instance: #if UNITY_EDITOR
private static string Name => ParrelSync.ClonesManager.IsClone() ? $"{FirebaseApp.DefaultName}_Clone" : FirebaseApp.DefaultName;
#else
private static string Name => FirebaseApp.DefaultName;
#endif
public static FirebaseApp App => FirebaseApp.GetInstance(Name) ?? FirebaseApp.Create(FirebaseApp.DefaultInstance.Options, Name); |
Describe the feature you'd like
I can't sign in to different firebase accounts, firebase is remembering the authentication when I sign in from the original editor and all clones are already signed in with that account, I can't change accounts on clones to test multiplayer
The text was updated successfully, but these errors were encountered: