Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Easy Mobile - Many-in-one package for mobile games

Discussion in 'Assets and Asset Store' started by pt5011, Jan 28, 2017.

  1. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    Hi @drktoninato

    1) On mobile, the GIF images will be stored in the Application.persistentDataPath, which is private directory of the app itself. Therefore no permission will be asked, because we won't need to access the device media files (gallery).

    2) Not the case due to number 1.

    3) Yes I believe you can delete files at given paths using the Delete method of File class (System.IO).

    Hope his helps!
     
  2. drktoninato

    drktoninato

    Joined:
    Jul 3, 2018
    Posts:
    11
    Yes, this helps a lot! You are precious as always, thank you!
     
  3. dicastyle

    dicastyle

    Joined:
    Jun 30, 2014
    Posts:
    5
    Hello,
    I'm using this asset.

    Could you help me?
    I found the problem of sharing on Android 8.0. It is normal below 8.0.
    The error message is

    -------------------
    E Unity : AndroidJavaException: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.PackageItemInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
    08-20 17:14:51.256 30192 30280 E Unity : java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.PackageItemInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
    08-20 17:14:51.256 30192 30280 E Unity : at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:584)
    08-20 17:14:51.256 30192 30280 E Unity : at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:558)
    08-20 17:14:51.256 30192 30280 E Unity : at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:400)
    08-20 17:14:51.256 30192 30280 E Unity : at com.sglib.easymobile.androidnative.EMUtility.ShareImage(EMUtility.java:44)
    08-20 17:14:51.256 30192 30280 E Unity : at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    08-20 17:14:51.256 30192 30280 E Unity : at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
    08-20 17:14:51.256 30192 30280 E Unity : at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source:72)
    08-20 17:14:51.256 30192 30280 E Unity : at android.os.


    I found setting in Android reference
    https://developer.android.com/reference/android/support/v4/content/FileProvider
    How can i apply this?

    Thank you!
     
  4. MassiveMonsterGames

    MassiveMonsterGames

    Joined:
    Aug 4, 2016
    Posts:
    10
    Hello I have sent you an email @pt5011 can you please reply.

    Having a few issues, including ads not showing up at all! :(
     
  5. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    Hi @dicastyle

    Thank you for choosing Easy Mobile!

    Could you please send this question to support@sglibgames.com so we can assist you? Please also include your invoice number in the email.

    Thanks again!
     
  6. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
  7. RyanJVR

    RyanJVR

    Joined:
    Jan 15, 2014
    Posts:
    3
    Hi,

    I'm currently looking into your plugin as a possible option to implement cloud saving in my game. The problem I'm having is the game I want to use it on is already released on IOS and android so I need to somehow copy the users already made locally saved serialized class file to the cloud! I've been reading through your documentation and want to know is this possible with your plugin? The code below is an example script of how I go about saving in my game. Sorry if this is a simple question, I am more artist than programmer!

    Code (CSharp):
    1. public void SaveGame()
    2.     {
    3.         BinaryFormatter bf = new BinaryFormatter ();
    4.         FileStream file = File.Create (Application.persistentDataPath + "/saveGame.sav");
    5.  
    6.         SaveData data = new SaveData ();
    7.                
    8.         data.gameType = GameManager.Instance.gameType; //float
    9.         data.currentScore = GameManager.Instance.currentTotal;
    10.         data.targetScore = GameManager.Instance.targetTotal;//int
    11.         data.myTeam = GameManager.Instance.myTeam;
    12.         data.playerTeam = GameManager.Instance.team;//string
    13.         data.opposition = GameManager.Instance.opposition;//bool
    14.  
    15.         data.playerPoolSave = new List<TeamAtt>(SimScript.Instance.playerPool);
    16.    
    17.         bf.Serialize (file, data);
    18.         file.Close ();
    19.  
    20.     }
    21.     public void LoadGame()
    22.     {
    23.         if (File.Exists (Application.persistentDataPath + "/saveGame.sav"))
    24.         {
    25.             BinaryFormatter bf = new BinaryFormatter ();
    26.             FileStream file = File.Open (Application.persistentDataPath + "/saveGame.sav", FileMode.Open);
    27.             SaveData data = (SaveData)bf.Deserialize (file);
    28.             file.Close ();
    29.  
    30.             GameManager.Instance.gameType = data.gameType;
    31.             GameManager.Instance.currentTotal = data.currentScore;
    32.             GameManager.Instance.targetTotal = data.targetScore;
    33.             GameManager.Instance.myTeam = data.myTeam;
    34.             GameManager.Instance.team = data.playerTeam;
    35.             GameManager.Instance.opposition = data.opposition;
    36.  
    37.             SimScript.Instance.playerPool = new List<TeamAtt>(data.playerPoolSave);
    38.  
    39.         }
    40.  
    41.     }
    42. }
    43. [Serializable]
    44. class SaveData
    45. {
    46.  
    47.     public string oppTeam;
    48.     public string playerTeam;
    49.     public float gameType;
    50.     public int targetScore;
    51.     public int currentScore;
    52.     public int myTeam;
    53.     public bool opposition;
    54.     public List<TeamAtt> playerPoolSave = new List<TeamAtt>();
    55.  
    56. }
     
  8. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    Hi @RyanJVR

    Yes it should be possible. The Saved Games API allows saving data as byte array to the cloud, so you can simply load the local saveGame.sav file into a byte array (maybe using File.ReadAllBytes) and then save them to the cloud.

    Hope this helps. Let me know if you have other questions!
     
    RyanJVR likes this.
  9. noahx

    noahx

    Joined:
    Nov 22, 2010
    Posts:
    50
    Hi,
    What are the "guidelines" for the "Automatic Ad loading" feature? I mean, if I'm not wrong, the defaults are set at 10 seconds for "Ad checking interval" and 20 seconds for "Ad loading interval". Without knowing exactly what happens behind, those numbers look like to low and would mean a lot of ad checking and loading, but not sure what would be the best "settings" or if there are specific scenarios where the number of seconds should be higher or lower. Any guide about that?

    Another question is if there would be a kind of problem with the Ad networks if I'm querying too frequently (if I get those values too low to check/load ads) and not showing the actual ad?. Or if an ad is loaded and not displayed in the game, the checking/loading does not happen again until the previously loaded ad is used?

    Would be nice if you can give more information about how the feature works

    Thanks.
     
  10. fireares

    fireares

    Joined:
    Mar 3, 2014
    Posts:
    9
    Hi everyone, I was going to test Easy Mobile by importing the Lite/Free version. However, I got stocked for the first step from the guide, which is placing the EasyMobile prefab. I couldn't find it anywhere from the package. Please see my screenshot. I couldn't see the option such as Settings and Create EasyMobile.prefab from the "Window" menu as the image attached from the official document. Please help. Unity version that I am using is 2018.2.5f1

    sampleImageEasyMobile.png
     
  11. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    Hi @noahx
    You can hover on the "Ad Checking Interval" and "Ad Loading Interval" to see their explanation displayed as a tooltip. The auto ad loading works this way: every (Ad Checking Interval) seconds it will check for the availability of the default ads. If an ad is not loaded and the time since its last loading exceeds the (Ad Loading Interval) time, it will start loading. In other words, we expect an ad to be loaded within a maximum of (Ad Loading Interval) seconds, otherwise we consider it a failed loading. I'd say the default values work fine in most cases.

    Other question: the checking still happens but the ad won't be loaded again if it hasn't been used.

    Hope this helps.
     
  12. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    Hi @fireares

    Thank you for downloading EM Lite. EM Lite doesn't require so doesn't have the prefab. In the first page of our doc we noted that users of EM Lite only need to refer to two chapters "Sharing" and "Native UI". You can safely ignore other chapters.

    Thanks.
     
  13. fireares

    fireares

    Joined:
    Mar 3, 2014
    Posts:
    9
    Hi @pt5011 . Thank you for your explanation. I started noticing EM from playing around with one of your game templates. From the documents of both the template and EM Lite, they show the same starting step, which is the configuration of the Easy Mobile prefab instance... I couldn't find it from the free version. I assumed that could be a compatibility issue, so I decided to contact you to sort it out.

    Does it mean that after purchasing the basic version, I will have the global setting option of EM from the Window menu and all other features except for those pro ones?

    Thank you!
     
  14. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    @fireares That's correct.
     
  15. fireares

    fireares

    Joined:
    Mar 3, 2014
    Posts:
    9
    Thanks @pt5011 . I have one more question. If I purchase the Basic version and realize I might use Pro. Do I have to pay for the full price for pro or only the price difference? Thanks!
     
  16. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    @fireares Yes we do have an option to upgrade from Basic to Pro for the difference of $20. You have to switch to the old asset store UI ('Shop on Old Store' button at the top right corner) to see that option https://www.assetstore.unity3d.com/en/?stay#!/content/75476

    I can't find the upgrade option on the new store too. I contacted Unity on this matter but haven't received any reply yet. Weird.
     
  17. rburns50

    rburns50

    Joined:
    Apr 16, 2016
    Posts:
    13
    Hi there, been using this for some time and also have a number of your templates - great work! However, for EU we now have GDPR so will this be updated to include policy opt in/out as per guidelines? Nearly all studios now include a panel when their games are first launched (opt in for targeted Ads or out for none personalised ones etc) - the user choice is saved and can be changed later in App settings if required. Compliance is not an option otherwise studio's risk being fined large sums of money! Are updates planned for this plugin?
     
  18. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    @rburns50

    Yes! We've been working hard on this, and without any (other) unexpected delay, version 2.0 of EMPro and EMBasic will be available next week! Of course, GDPR support will be included, among a bunch of other new things, including a brand new UI design :D

    privacy-module.png consent-dialog-anatomy.png
     
    Atrixx and rburns50 like this.
  19. rburns50

    rburns50

    Joined:
    Apr 16, 2016
    Posts:
    13
    Fantastic - cannot wait for the update, need to implement in a raft on Apps!!! Thank you :)
     
    pt5011 likes this.
  20. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    stevenatunity likes this.
  21. anamta93

    anamta93

    Joined:
    Mar 21, 2014
    Posts:
    12
    Hey, I've 2 questions:

    1. Can we use this game without easy mobile pro?
    2. Is this webGL compatible?
     
  22. rburns50

    rburns50

    Joined:
    Apr 16, 2016
    Posts:
    13
    Hi there - documentation and update is great but I confess I am struggling to digest and implement GDPR panel in my simple game I am using as a test! I have implemented Admob and Chartboost - edited scripts accordingly so happy in that regard (banner, interstitials and reward ads). Confess I have read over the document a few times but struggling with the GDPR panel and how to implement (I am not a noob but not that experienced either)!! I have the EM initialisation script attached so that inits on game load - but just stuck now getting the GDPR stuff in. I am sure its easy but stuck on where to start
     
  23. blitzcloud

    blitzcloud

    Joined:
    Aug 18, 2015
    Posts:
    26
    Great! Gravity popup is there! awesome, guys. Let's see if the transition to 2.0 goes smoothly
     
    pt5011 likes this.
  24. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    Hi,
    1. Yes, we noted that in its description.
    2. The game mainly is for iOS & Android, but it should export fine to WebGL thanks to Unity magic, of course mobile specific features won't work.

    For questions about other assets of ours please contact us directly at support@sglibgames.com, since this is a dedicated thread of Easy Mobile. Thank you!
     
  25. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    Hi @rburns50

    I suggest you take a look at our PrivacyDemo script for an example on how this can be done. Basically you need to do following steps:

    1. Prepare a consent dialog, either using the graphical composer (in Privacy module settings) or from script (similar to our PrivacyDemo script). In this dialog you may want to insert a number of toggles corresponding to the consent-requirable services in your app.

    2. Show the consent dialog when the app launch first time, you can grab the dialog composed with the graphical composer using Privacy.GetDefaultConsentDialog() then call its Show() method. If you create the dialog from script simply call Show() on it.

    3. Subscribe to the Completed and Dismissed events of the dialog to know when it is closed. You can decide whether to show the Dismiss/Cancel button when calling Show() method. When the consent dialog is shown first time, you may want to hide the Cancel button to force the user to specify their consent. In subsequent displays of the dialog, you can show such button so the users can dismiss it without updating their consent (useful in case they open the dialog unintentionally, e.g. by hitting some button). When the dialog is closed by a button different than the Dismiss/Cancel button, the Completed event will fire and return the ID of the clicked button, and the values of the toggles. You would use these toggle values to update consent for your services accordingly. After that you can call RuntimeManager.Init() to start EM.

    Hope this helps. We know this is a bit confusing but believe everything will become clear after your first use of it. If you have other questions we're happy to support.
     
  26. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    Yes gravity popup is there! Thank you for bringing it up! The transition should be smooth, if you have any problem just let us know :)
     
  27. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    805
    Hello pt5011,

    I am planning to buy your asset to use in my Android/iOS game. I will need to use the sharing image and text, the gif sharing, the saving/loading capability, the push notification, and finally the rate my app service.

    Before I buy and after reading all the documentation I would like to ask you some questions. About the saved games: My idea is to create a class containing all the variables I will need to save/load, this will include for example, float, int, List<T>, Vector3, etc.

    Is it possible to save/load a class like this? Is there any example on how to convert this class to byte[] and back? would I need other asset for this task or your asset has something for doing this operation. Or is there a better way to use this "Saved Games" feature?

    Regards,
    Carlos
     
  28. blitzcloud

    blitzcloud

    Joined:
    Aug 18, 2015
    Posts:
    26
    Sadly, I encountered the dreaded failed to convert dex classes. It happened in the past and it was super difficult to get rid of it, I had to uninstall every plugin related to the functionalities (admob, gpg) and after 3 tries it worked. Now, force resolve does nothing, and I guess I can put the error message. They say that dex issues are caused by duplicate classes, but what I know for sure is that I don't see duplicate files (meaning with the same filename so I can easily cull it off).

    The problem happens as soon as it asks you to remove the obsolete gpg libraries, it just screws everything up no matter your choice, I think

    Oh yeah, one more detail: having GPG plugin by itself doesn't cause a problem. The problem happens as soon as easymobile and GPG are both installed afaik
     
  29. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    Hi @strongbox3d

    Thank you for considering Easy Mobile!

    The Saved Games feature allows reading and writing data as binary blobs (ie. byte[]) so what you intend to do is correct. You can create a serializable class for your data and use Unity's built-in JsonUtility to convert it to a JSON string, then store the string as a byte array. When reading data you'd do the reverse process (byte[] -> Json -> class object). This may sound like a few steps involved but actually is just a few lines of code. So I believe you don't need any other asset for this task. The Saved Games section in our demo app does exactly what I've described so its scripts can be used as an example.

    Hope this helps. If you have other questions don't hesitate to let us know. Thanks again!
     
  30. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    Hi @blitzcloud Do you mean the error occurred in a project with only EM and GPGS, or was there any other plugin? Because we didn't have such issue when testing EM with GPGS (alone) on our end.

    It seems that GoogleMobileAds was there too? Recently we notice that newer versions of GMA (3.14, 3.15) when using together with GPGS 0.9.50 result in build errors. The reason seems to be GPGS 0.9.50 is not compatible with ver 15.x.x of the play-services libraries that are imported once the new versions of GMA exist. In such case we recommend downgrade to GMA 3.13.1 instead, which uses play-service 12.x.x and does not conflict with GPGS.

    You may want to give it a try if this applies to your case. If the problem persists, please post the errors here.

    Thank you!
     
    Last edited: Sep 14, 2018
  31. blitzcloud

    blitzcloud

    Joined:
    Aug 18, 2015
    Posts:
    26

    It happens with just GPGS and EM(pro). The only plugin i'm using aside from that is savegame pro, native share and twitter kit

    Also if you could provide a link to GMA 3.13.1 that'd be great, because I can't seem to find it
     
    Last edited: Sep 14, 2018
  32. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
  33. blitzcloud

    blitzcloud

    Joined:
    Aug 18, 2015
    Posts:
    26
    New project in 2018.1.9f1

    apply GPG 0.9.5
    apply easymobile

    Stuck on resolving dependencies forever
     
    Last edited: Sep 16, 2018
  34. blitzcloud

    blitzcloud

    Joined:
    Aug 18, 2015
    Posts:
    26
    Interesting. Apparently I can make EM and GPGS work and compile, but as soon as I add Unity IAP: boom, it breaks with the converting dex classes error. I'm using the latest version
     
  35. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    It would be easier if you post the specific errors. Thanks.
     
  36. blitzcloud

    blitzcloud

    Joined:
    Aug 18, 2015
    Posts:
    26
    That's the problem, it doesn't actually say anything but "unable to convert classes into dex format". The problem itself appears to be classes that are named the same in different files. If the jar or aar has the same name, it's usually quite simple to pinpoint the culprit: a duplicate file of the same classes. But I can't seem to see any duplicate jar or aar.

    Hold on, i'm gonna check something that I read on stackoverflow

    EDIT:

    or in this case it was too many methods (over 64k limit) which can be circumvented by using gradle build instead of internal and.... everything works now I guess
     
    Last edited: Sep 17, 2018
  37. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    @blitzcloud I'm glad you figured out the problem!

    Normally there should be some log in the console containing useful information about the failed build. And yes, you need to enable multidex (using gradle) if there're many android dependencies in the project that the 64 limit is exceeded.
     
  38. drktoninato

    drktoninato

    Joined:
    Jul 3, 2018
    Posts:
    11
    Hi @pt5011

    I encountered a problem with Game Services.

    I followed the documentation to setup everything, and everything looks like working fine.

    When it comes to initialize GS though, it doesn't allow me to sign in.
    I tried all the ways (Auto Initialization, Managed and Unmanaged), but the result is always the same:
    After showing me the green box of "connecting to GPG", the initialization loads a bit and then it closes without initializing anything.
    (I tested if it automatically initialized in background or was initialized already with GameServices.IsInitialized() but those were not the cases)
    (I tested all of this using my smartphone and an android emulator)

    I followed the documentation step by step and I don't know what is going wrong: my code or maybe some mistake I did during the setup.

    Here's the code of my last try to initialize GS (with Unmanaged Initialization):

    Code (CSharp):
    1. public void GPGSInitialize()
    2.     {
    3.         if (GameServices.IsInitialized())
    4.         {
    5.             NativeUI.Alert("Alert", "The module is already initialized.");
    6.         }
    7.         else
    8.         {
    9.             GameServices.Init();
    10.         }
    11.  
    12.         OnEnable();
    13.         OnDisable();
    14.     }
    15.  
    16. // Subscribe
    17.     void OnEnable()
    18.     {
    19.         GameServices.UserLoginSucceeded += OnUserLoginSucceeded;
    20.         GameServices.UserLoginFailed += OnUserLoginFailed;
    21.     }
    22.  
    23.     // Unsubscribe
    24.     void OnDisable()
    25.     {
    26.         GameServices.UserLoginSucceeded -= OnUserLoginSucceeded;
    27.         GameServices.UserLoginFailed -= OnUserLoginFailed;
    28.     }
    29.  
    30.     // Event handlers - SignIn con GPGS
    31.     void OnUserLoginSucceeded()
    32.     {
    33.         Debug.Log("User logged in successfully.");
    34.  
    35.         if (GameServices.IsInitialized())
    36.         {
    37.             button.GetComponentInChildren<Text>().color = new Color(0f, 255f, 0f);
    38.         }
    39.     }
    40.  
    41.     void OnUserLoginFailed()
    42.     {
    43.         Debug.Log("User login failed.");
    44.         if (!GameServices.IsInitialized())
    45.         {
    46.             button.GetComponentInChildren<Text>().color = new Color(255f, 0f, 0f); //the text of the button always turns red
    47.         }
    48.     }
    Do you have any idea why GS is not working?

    Thank you in advance.
     
  39. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
  40. drktoninato

    drktoninato

    Joined:
    Jul 3, 2018
    Posts:
    11
    @pt5011

    I was building with gradle without development mode. I added the **SIGNCONFIG** line in the custom gradle config (which I wasn't using) and tried to build, but I still can't sign in.

    P.S. Your new documentation looks even more professional, gj!
     
  41. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    @drktoninato

    So you were always building non-development builds correct? Alright, it's another issue I guess.

    Now looking back at your code, there's one detail that I overlooked: you were calling OnEnable and then immediately calling OnDisable, which unsubscribes the events so no wonder the handlers will never be called. In our example scripts, OnEnable and OnDisable are MonoBehaviour functions and are called by Unity automatically. Does your class inherit MonoBehaviour? If yes there's no need to invoke them manually like that.

    That said, according to your description it seems like the login actually failed, rather than only the event handlers not getting called. So please check:

    - make sure the apk was built with a production keystore, not a debug one.
    - make sure the app was properly linked on Google Play console.
    - make sure your account was added as a Game Services tester on Google Play console.

    See the "Avoid common setup problems" section here https://developers.google.com/games/services/console/enabling

    Hope this helps. And thank you for the comment on our new doc :)
     
  42. BigToe

    BigToe

    Joined:
    Nov 1, 2010
    Posts:
    183
    I am updating from apparently 1.1.1. I set aside my EM_Settings and Generated files. I can't seem to complete this update and keep all of the data I have for Leaderboards and Achievements. When I add the EM_Settings back in, all my leaderboard and achievement data is gone. How do I preserve or import those back into the project?
     
  43. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    @BigToe

    Hi, as mentioned here, in version 2.0 we had to make some changes that break backward compatibility (for good reason). So unfortunately you have to re-apply all the settings. One way to mitigate this is open the old EM_Settings in a text editor, and copy the values to corresponding fields in the new Settings UI. Well, it's still manual but may be a bit quicker.

    I'm sorry for the inconvenience.
     
  44. BigToe

    BigToe

    Joined:
    Nov 1, 2010
    Posts:
    183
    Thanks. You might clarify in that paragraph that users will need to enter all their data again as it seems like following some of the old upgrade rules might still apply. Plus if you're updating a project you haven't been working in in a while, it's a little daunting to recollect how it was configured initially.

     
  45. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    @BigToe You're right. Version 2.1 will be out soon and we'll update the doc with it.
     
    BigToe likes this.
  46. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    Hi @MassiveMonsterGames

    I saw your review on Asset Store. May I know which email address you used to contact us? I don't think we ever leave any support email un-responded, unless there's something unexpected (e.g. the email somehow got marked as read while we didn't really read it).
     
  47. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    110
    I'm having an issue with cloud saves on iOS with Easy Mobile Pro v2.1.0 (same issue was present in v1.3.0).

    If I open a saved game like this:

    Code (CSharp):
    1. GameServices.SavedGames.OpenWithManualConflictResolution(fileName, true, OnOpenSavedGameConflict, OnSavedGameOpened);
    Then read the saved game data:

    Code (CSharp):
    1. GameServices.SavedGames.ReadSavedGameData(savedGame, OnCloudSaveGameLoaded);
    In the resulting callback, OnCloudSaveGameLoaded, the "byte[] data" will have a Length of 0 even if I have valid data saved in the cloud. This only happens on a new install of my game.

    If I wait about 5 - 15 seconds and try again, then the data will be correctly retrieved. If the device is offline (no wifi/cell data), then it will always return a data with a Length of 0.

    There are no error messages, and I'm using code that is from the sample code in the User Guide.

    On Android, it correctly retrieves the data using the same code (and has a data.Length of 0 if there is no save data found in the cloud, otherwise it will always have the actual save data when it calls the callback), and will make me wait until the data is retrieved...whereas on iOS it returns nearly immediately.

    This presents a big problem, because a pretty common occurrence is for a player to play the game for a long time on a device on iOS, then get a new phone, install the game, and go to load from the cloud and it says there is no cloud save data. And I can't see a way to detect this case, because it's the same return/result values as when there really is no cloud save found. So I risk the player uploading their save data by mistake, and saving over the valid cloud data with their new/fresh save data on the new device (players are still often confused about cloud operations). I had hoped the conflict function would deal with this, but in this case there is no conflict, it's just seen as a normal save/upload to cloud.

    Have you encountered this issue before? Any ideas on how to avoid it/detect it/fix it?

    Thanks!
     
    Last edited: Sep 28, 2018
  48. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    383
    Hi @smithmj5

    No I don't think we experienced this while testing. But it could be some actual issue that we overlooked. Did this happen on any specific iOS version?

    We will look into this problem. So any specific steps to reproduce it would be much helpful. And thank you for bring this up.
     
  49. Hermonirr

    Hermonirr

    Joined:
    Dec 23, 2013
    Posts:
    53
    Hi,

    Just downloaded Easy Mobile Lite. Couldn't even find the settings, they're not in the menu.. Where could I find them?

    Thanks.
     

    Attached Files:

  50. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    110
    I'm wondering if this is how iCloud works (or whatever the Easy Mobile Pro plugin is using for cloud saves on iOS, in the native/library code). It seems like when this issue happens on iOS, the functions return a SavedGame instance where savedGame.ModificationDate is the current date and time (as in, it seems like it just creates a placeholder/new file instead of actually checking what's in the cloud).

    This happens on iOS 10 and 11 (haven't tested on other versions). I tested on on iPhone 8 and a 2017 iPad.

    Repro steps (on an iOS device):
    1. Install the game and create a cloud save file, and make sure it's in the cloud/synced
    2. Uninstall the game
    3. Do a fresh install of the game
    4. Within the first few seconds of the game running, call: GameServices.SavedGames.OpenWithManualConflictResolution(fileName, true, OnOpenSavedGameConflict, OnSavedGameOpened);
    5. After the file is opened, call: GameServices.SavedGames.ReadSavedGameData(savedGame, OnCloudSaveGameLoaded);
    6. In the OnCloudSaveGameLoaded function (which will be called nearly immediately, like 0.1 seconds after the call to ReadSavedGameData), notice that you will have byte[] data that is of Length 0, there will be no errors, and the savedGame.ModificationDate will be the current date and time.
    7. If you wait about 5 seconds and then try again, and do this a couple of times, eventually it will return the real cloud save data instead of an empty placeholder.
    What is expected to happen:

    OnCloudSaveGameLoaded should only be called after iCloud was checked for the existence of a cloud save file (which does exist, as it was created and synced in step 1), and the returned data would be the actual data that is currently in the cloud.

    Note that on Android, it works correctly - even if you try to retrieve the cloud data immediately after signing in to Google Games, it will wait until it retrieves the cloud data before calling OnCloudSaveGameLoaded.

    Let me know if you need any more info!
     
    pt5011 likes this.
unityunity