Hi, my app bundle is not working properly after downloading from Google Play store.
- Although my game is working as expected on Unity. In the physical android device: game is creating new user IDs each time when I uninstall/reinstall or update the game. As I mentioned above it is working well in Unity editor.
- Unity editor is creating 2 different Authentication IDs but works with only one. so I can save and load from unity. However when I try on android phone it is creating 8 IDs then 1 more ID on each new reinstall the game.
So how can I be ensure to retrieve correct ID’s data after reinstalling/ updating the game thus my players will not lose their progress after any update on my game.
secondly, although as seen below I am checking if authentication is active or not to enable it. How come on the first attempt it can create 8 or more Authentication IDs.
my cloud loading script is as below. Can someone help please
public static async void LoadData()
{
if (CentralDataProcessor.isAuthenticationActivated == 0)
{
await UnityServices.InitializeAsync();
Debug.Log("Is Signed in: " + AuthenticationService.Instance.IsSignedIn);
if (AuthenticationService.Instance.IsSignedIn == false)
{
await AuthenticationService.Instance.SignInAnonymouslyAsync();
}
CentralDataProcessor.isAuthenticationActivated++;
}
data = await CloudSaveService.Instance.Data.LoadAsync(new HashSet<string> { CLOUD_KEY });
myJson = data[CLOUD_KEY];
gameData = JsonUtility.FromJson<GameData>(myJson);
dataToStore = JsonUtility.ToJson(gameData, true);
}