Search Unity

[RELEASED] CloudOnce | Unified Game Services API

Discussion in 'Assets and Asset Store' started by Trollpants, May 6, 2015.

  1. Morgoth666

    Morgoth666

    Joined:
    Oct 29, 2014
    Posts:
    3
    Hi. I am considering purchasing this asset. Is it possible to provide playmaker actions/support to your plugin?
    Thx in advance.
     
  2. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Hi @Morgoth666, there is no official Playmaker support yet, but it's certainly possible to integrate it if you can make the Playermaker Actions yourself. I have a handful of actions made, that might get you started.

    - Jan Ivar
     
    Last edited: Jan 7, 2016
  3. zmeinaz

    zmeinaz

    Joined:
    Jul 3, 2012
    Posts:
    27
    Hi Jan,

    I am seeing a slight FPS drop on Android (nexus 4) when submitting Achievement and Leaderboard updates. I sometimes submit updates to 5 achievements/leaderboards at the same time as increments. What is the best practice for submitting multiple leaderboard and achievement updates fairly often (possibly 1-2 times per second)?
     
  4. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    @zmeinaz submitting to leaderboards that often is definitely not recommended. It will cause a lot of network traffic and, like you said, slow down the game. You need to cache to values locally and only submit at key moments or at an interval. The most common scenario is that you submit when the player dies. Of course some game will require more often than that. Games can be very different and you need to make a call about what is right for your game.

    - Jan Ivar
     
  5. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Version 1.8.0 has been submitted to the Asset Store!

    Release Notes
    -------------
    - Added OnSignedOut event
    - Updated GPGS plugin from v0.9.27 to v0.9.30
    - Changed OnCloudLoadComplete callback to return true when there is no cloud data
    - Made Save method more consistent across providers
    - Fixed threading problem with Google Play guest user
    - Code cleanup

    - Jan Ivar
     
    PixelEnvision likes this.
  6. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    I'm going to purchase this in next few days, it's great to see that it's actively maintained. :)
     
  7. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Thank you! :)
     
  8. ChezDoodles

    ChezDoodles

    Joined:
    Sep 13, 2007
    Posts:
    107
    Any plans for Dropbox and/or OneDrive support for at least cloud-save (and preferably even have a generic leaderboard / achievements on top of that) ...?
    Please?
     
  9. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    @ChezDoodles, I'm sorry, but that is definitely outside of the scope of CloudOnce. At least for the foreseeable future.

    - Jan Ivar
     
  10. relayOne

    relayOne

    Joined:
    Sep 28, 2012
    Posts:
    23
    I am trying to CloudOnce to work on my iPhone, and have noticed that OnInitializeComplete is not invoked when I run the game the first time. I am relying on this function to be invoked before the game allows the player to play, so my game essentially hangs right now.

    Is there another callback method that I should register to (like an Initialize failed method), so I can have an alternative way to let the game move forward even if the cloud didn't initialize? I need to call some of my own initialize functions based on the values in the save file. I can't let the player play until I call those initialize function. Basically, I need to invoke some code after I run "Cloud.Provider.Initialize(true)"?

    Looking through the code a bit, it looks like OnInitializeComplete may not be called when the cloudstring is null (i.e. the first time the game is run). Here is some Debug messages from XCode:

    2016-02-06 10:39:49.584 shazap[433:428032] Get string with key: TrollpantsDevString
    2016-02-06 10:39:49.585 shazap[433:428032] CloudOnceCloudSave init
    2016-02-06 10:39:49.648 shazap[433:428032] Getting dev string TrollpantsDevString
    2016-02-06 10:39:49.648 shazap[433:428032] Returning string:
    iCloud dev string was null or empty.

    No data saved to the cloud yet.
    Trollpants.CloudOnce.Internal.Providers.iOSCloudSaveWrapper:Load()
    Trollpants.CloudOnce.Internal.Providers.iOSCloudProvider:Initialize(Boolean)
    SaveManager:Awake()

    OnCloudLoadComplete
    Trollpants.CloudOnce.Internal.CloudServiceSingletonBase`1:InternalOnCloudLoadCompleteEventHandler(Boolean)
    Trollpants.CloudOnce.Internal.Providers.iOSCloudProvider:TriggerOnCloudLoadComplete(Boolean)
    Trollpants.CloudOnce.Internal.Providers.iOSCloudSaveWrapper:Load()
    Trollpants.CloudOnce.Internal.Providers.iOSCloudProvider:Initialize(Boolean)
    SaveManager:Awake()

    Cloud load was successful.
    Trollpants.CloudOnce.Internal.CloudServiceSingletonBase`1:InternalOnCloudLoadCompleteEventHandler(Boolean)
    Trollpants.CloudOnce.Internal.Providers.iOSCloudProvider:TriggerOnCloudLoadComplete(Boolean)
    Trollpants.CloudOnce.Internal.Providers.iOSCloudSaveWrapper:Load()
    Trollpants.CloudOnce.Internal.Providers.iOSCloudProvider:Initialize(Boolean)
    SaveManager:Awake()

    (That's the last CloudOnce message)
     
  11. relayOne

    relayOne

    Joined:
    Sep 28, 2012
    Posts:
    23
    I need to ask more questions about how cloud saving works in order to use it properly. When I store complex JSON data in strings in CloudOnce, I think that I have many problems. First, I cache values from the JSON string in a class. This means that I stop querying the CloudOnce value after the first time I read it — and I potentially miss updates that could have happened to that data. Next, my complex data can’t be properly synched with a simple rule such as Most, Least, or Recent. So, I have questions:
    • When is CloudOnce data updated from the Cloud, and when is read from local storage?
    • What triggers a merge?
    • Does loading always trigger a merge? (i.e. data in cloud was written from the same device, and from an earlier time perhaps doesn’t trigger a merge)?
    • Is there a way for me to know when I should re-read values from CloudOnce?
    • What happens if I start playing a game in airplane mode, and then turn off airplane mode in the middle of playing? (i.e. when does the sync happen?)
    • Have you considered adding a CloudOnce feature to allow the game developer to supply a merge function? My merge function wouldn’t be a binary return value — it would generate a third value that merges two JSON strings.
      • It’s possible that the “Greatest” priority for strings could always delete local device progress saved in a JSON string. Example: a state string gets shorter after making progress, which invokes the “Greatest” priority
    • Is there a simpler way I could manage merges for complex data? CSR racing, and other games, have a feature that only tells the user that the server has a more recent file, and asks the player if they want to “Recover” the file. It’s up to the user to say yes. If they say no, then the entire state on the device overwrites the server state. If they say yes, then the entire state on the server overwrite the state on the device. It’s simple and predictable, because it asks the player to get involved in a binary decision.
     
  12. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    I'm sorry for the late answer @relayOne, I haven't gotten any notifications for some reason.

    OnInitializeComplete should be called every time. I double checked the source and I can't find any situation where that would fail. All the messages you have posted are from the load process, which happens after initialization. So OnInitializeComplete should have been called before that.

    If you need to wait for cloud data before allowing the user to interact with the game, I would use OnCloudLoadComplete instead. It will trigger every start-up (even when sign-in is unsuccessful or the user is offline).

    A note on saving JSON strings with CloudOnce. Because CloudOnce saves all the data as JSON, there have been cases where deserialization gets confused and the load fails. So it's best to obscure the JSON string before saving it to a CloudString, for example by converting it to a base64 string.
    • The local cache is updated each time the Load method is manually called and after initialization (the last step of the initialization is to trigger the load method).
    • Any new data is automatically merged into any existing data. Safeguards are in place to make sure that cloud data is not overwritten by default values. This is done by checking the data's time stamp.
    • You should re-read the values when OnNewCloudValues is called.
    • If you start the game when offline, CloudOnce will default to using the local cache. Any changes to the data will merge properly at the next sync. However the game will need to be restarted for it to attempt to log in again, unless you provide the user with a way of logging in within your game.
    • Providing your own merge function or making CloudOnce ask for user interaction is not possible without modifying the source. However using Latest on a CloudString and having your own conflict resolver go through the data is essentially providing your own merge method.
    In general I would advise to make use of the provided cloud variable types as much as possible, as the conflict resolution has been tested extensively. I know this can be a pain when you already have a system in place, but when choosing to put all you data in a JSON string you are missing out on the best part of CloudOnce, as you need to do a lot more managing of the data yourself. In some cases of course this is unavoidable, as with complex data.

    - Jan Ivar
     
  13. relayOne

    relayOne

    Joined:
    Sep 28, 2012
    Posts:
    23
    Thanks for your thoughtful response. I've decided to get rid of my complex data, and just use built-in simple datatypes. I think it's going to work better. However, I need to delete my iCloud data, but Apple doesn't provide a way to delete key-value data for some reason. It appears that they might give this ability through code, as I've infered from reading this:

    http://stackoverflow.com/questions/...ta-doesnt-clear-out-nsubiquitouskeyvaluestore

    Can you look into this? I really can't find a way to clean up this data on my end.
     
  14. relayOne

    relayOne

    Joined:
    Sep 28, 2012
    Posts:
    23
    Another strange thing that I'm seeing is after I invoke DataManager.ResetAllData(); it appears to reset all the s_localGameData objects. However, when I query CloudInt variables that I declared, they _don't_ have their values reset afterall. Are my CloudInt variables not the same values in s_localGamaData?
     
  15. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    I've answered your email @relayOne :)

    - Jan Ivar
     
  16. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Version 1.8.1 has been submitted to the Asset Store!

    Release Notes
    -------------
    - Added DeleteAllCloudVariables method
    - Updated GPGS plugin from v0.9.30 to v0.9.31
    - Fixed ResetAllData method
    - Fixed GPGS being initialized with wrong settings if calling Save or Load before Initialize

    - Jan Ivar
     
  17. victor_sq

    victor_sq

    Joined:
    Feb 19, 2016
    Posts:
    36
    HI, thanks for plug-in it's really easy to use, especially for beginners like me, I've run in to some issue recently. My game stop signing in to google play, basically process is initialized and I can select user to sign but after it nothing happening, I have no mistake reports over building apk and I am using few plug-ins it's chartboost and soomla (both of them working fine). PS I've run setup with my app id and manually checked manifest it is contain correct app Ad. Could you help me to resolve it, this last thing to fix before final realise. Thanks in advance
     
  18. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Hi @Victor SQF, please email me a LogCat log from when you sign-in fails. You can send it to support@trollpants.com. Make sure debug mode is active in the CloudOnce editor before building your test build. Please also include the version number you are using of CloudOnce in the email.

    - Jan Ivar
     
  19. victor_sq

    victor_sq

    Joined:
    Feb 19, 2016
    Posts:
    36
    Hi Ivar, thanks a lot for immediate assistance, it was my mistake with keystore signature as you mention in mail. Just want to say CloudOnce is great product which save lots of time for me and other people for sure. You guys doing an amazing job. Unlike rest of plugins which is not user friendly (honestly I've spend already 500 us trying different plugs) CloudOnce as simple to use as it might be. Wish you project to grow to something big and comprehensive link between unity and all this social, cloud, google play services etc. anyhow right now its already very cool plug worth every penny.
     
  20. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Thank you for your kind words @Victor SQF! I'm happy you solved the problem :)

    - Jan Ivar
     
  21. reinaldozhang

    reinaldozhang

    Joined:
    Jun 9, 2015
    Posts:
    8
    Hi @Trollpants ! I have integrated your plugin for my previous game and i can tell that it is very helping and worth it. This time, i updated the plugin to its latest version and then directly imported it to my latest game. Well, i also used AdMobs for unity plugin and since it does not produce Android Manifest.xml file in my MainLibProj folder in my project, i got this error upon building it to Android after this plugin is successfully imported.

    > Project '/Users/admin/Desktop/src/company/newGame/Temp/StagingArea/android-libraries/MainLibProj' is missing AndroidManifest.xml file.
    > UnityException: Adding Android library projects failed!

    What should i do with the missing Android Manifest? Can I just copy it from somewhere and paste it in the MainLibProj folder? I am using Unity 5.3.2p and Google AdMobs Unity Plugin v3.0.0 and latest version of CloudOnce plugin. Thank you.

    =========================================================================

    EDIT: I tried to insert an Android Manifest.xml into the folder with some basic lines of code. As the result, it passed through the error.

    However, a new error showed up which says failed to repackage resources. Since i went through this error last week, which is the incompatibility of adMobs and Google Play Games, i deleted the google-play-services-lib folder inside the project. Upon deleting, the project builds pass through the resources packaging step but show another error which says:

    ERROR: "Unable to convert classes into dex format."
    Log:
    > CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
    /Library/Java/JavaVirtualMachines/jdk1.7.0_76.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/admin/Downloads/android-sdk-macosx/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar"

    I find no duplicate jar files in my lib folder inside my Plugin folder. What should i do next? Thanks.
     
    Last edited: Feb 24, 2016
  22. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Hi @reinaldozhang, I'm afraid you can't simply delete google-play-services-lib. CloudOnce will not function without it. A manifest file is added to the MainLibProj folder when you run the Google Application ID setup in the CloudOnce Editor. So I suggest you revert back to before importing CloudOnce into your project and start again. This time after importing the package, run the setup in the CloudOnce Editor before attempting to build. Please refer to this section of the Getting Started guide for more details: http://trollpants.com/cloudonce/gettingStarted.html#editor-window
     
  23. reinaldozhang

    reinaldozhang

    Joined:
    Jun 9, 2015
    Posts:
    8
    Hi again @Trollpants, so it is like that. I see. I've reverted my project, configured the Google Play Games successfully on the editor but now, during build, i failed to repackage resources with the following error:

    > CommandInvokationFailure: Failed to re-package resources. See the Console for details.
    /Users/admin/Downloads/android-sdk-macosx/build-tools/21.1.1/aapt package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "/Users/admin/Downloads/android-sdk-macosx/platforms/android-23/android.jar" -F bin/resources.ap_ --extra-packages com.google.unity:com.google.example.games.mainlibproj:android.support.v7.appcompat:com.amazon.ags:com.google.android.gms:com.google.android.gms.ads:com.google.android.gms:android.support.v4 -S
    >and there is many more..

    I have no idea why this error shows up. Can you help me with this? Fyi, I am using adMobs though. It is said that the newest adMobs doesn't need the google-play-games-lib plugin anymore. Thank you again, Jan.

    EDIT: I tried to update to the latest Android build tools, see if this is a bug.
    UPDATE: Android build tools 23.0.2 is not helping.
     
    Last edited: Feb 25, 2016
  24. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Sure thing, I'll check it out for you. Will update this post as soon as I have some more information.

    UPDATE: Due to the new way Google is importing the Android SDK resources there is no easy quick way of making AdMob and CloudOnce compatible. That said, I have been planning to update CloudOnce to use the new system, so I guess this is as good a time as any to make that happen. I'll work on an update today. If you could email me your order number (support@trollpants.com), I'll send you the update as soon as it's ready, so you don't have to wait for it to show up on the Asset Store.

    - Jan Ivar
     
    Last edited: Feb 25, 2016
  25. reinaldozhang

    reinaldozhang

    Joined:
    Jun 9, 2015
    Posts:
    8
    Well, that is amazing! Thank you, Jan. I've sent you the email. Check it out.
     
  26. UDevApp

    UDevApp

    Joined:
    Jun 6, 2015
    Posts:
    2
    Hello I have same problem about this. I add plugins (abmob, soomla spend, cloud once).
    When the new version updates in store?
     
  27. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    @UDevApp I have responded to your email.
     
  28. UDevApp

    UDevApp

    Joined:
    Jun 6, 2015
    Posts:
    2
    Thank you. Trollpants. Alpha version works very well.
    After I remove play-store-lib and version res files which I see in stackoverflow, I reimport all.
    and It works perfectly.
     
  29. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    That's awesome @UDevApp, happy to hear it's working for you!

    - Jan Ivar
     
  30. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Dev update

    The next update will likely be v2.0.0, and thus it will include breaking API changes. This will allow us to do some needed clean-up, as CloudOnce has been out for nearly a year now. So know that if you are already using CloudOnce in your current project, it may be a little work to update to the latest version.

    Planned features for this update include:
    - Switching to the Google Jar Resolver for importing Android SDK libraries. This will make CloudOnce compatible with other Google plug-ins like AdMod.
    - Reworking the save system to reduce the size of the saved data.
    - Attempting to remove the need for the dreaded READ_PHONE_STATUS permission.
    - Remove hard-coded paths in the editor. This will give users more freedom to organize the CloudOnce assets the way they want in each Unity project.
    - Update GameCirle to 2.5.3
    - Update GPGS to 0.9.32

    - Jan Ivar
     
    PixelEnvision likes this.
  31. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    Great list!

    Just to know, what is your planned ETA for this releasae? I've just purchased it today and I'll probably begin my integration next week but I could delay it a bit more if the release is due soon...
     
  32. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    @PixelEnvision I'm hoping to be done with it before the end of next week. It could be done before that, or a little later, due to a couple of the updates containing some uncertainty about how they will be implemented. If you send your invoice/order number to support@trollpants.com, I'll make sure you're sent the update as soon as it's done.

    - Jan Ivar
     
  33. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    @Trollpants I would be fantastic, thank you. Just sent...
     
  34. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Version 2.0.0 has been submitted to the Asset Store!

    Release Notes
    • A lot of breaking API changes. Upgrade is not recommended for existing projects close to a deadline. If you choose to upgrade, the previous version must be deleted from the project before importing the new version.
    • All commands that started with Cloud.Provider now just start with Cloud, for example Cloud.Provider.Storage.Load is now Cloud.Storage.Load
    • Removed the need for the READ_PHONE_STATUS permission on Android
    • Added autoSignIn and autoLoad parameters to the Initialize method to allow for more flexibility
    • Added SignIn and SignOut methods
    • Added Synchronize, DeleteVariable, ClearUnusedVariables and DeleteAll methods to Storage
    • Added undo functionality to the CloudOnce Editor
    • Reduced size of saved cloud data
    • Removed hard-coded paths from the CloudOnce Editor
    • Switched to Jar Resolver for importing Android SDK libraries. This makes CloudOnce compatible with other Google plug-ins like AdMob.
    • Streamlined constructors for cloud variables
    • Merged OnSignedIn and OnSignedOut events into OnSignedInChanged<bool>
    • Renamed a few classes to better reflect their function
    • Deleted obsolete files
    • Code clean-up
    • Updated GPGS plugin from v0.9.31 to v0.9.32
    • Updated Jar Resolver to v1.1.1
    • Updated GameCircle libraries to v2.5.3
    • Sunsetting support for Unity 4
    - Jan Ivar
     
    Last edited: Mar 19, 2016
  35. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Version 2.1.0 has been submitted to the Asset Store!

    Release Notes
    • Added LoadUsers method
    • Added LoadAchievements method
    • Added LoadAchievementDescriptions method
    • Jar background resolution is now disabled OnLoad
    • Changed DEBUG build symbol to CO_DEBUG
    - Jan Ivar
     
  36. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Version 2.2.0 has been submitted to the Asset Store!

    Release Notes
    • Added CloudLong type
    • Added CloudDateTime type
    • Added CloudDecimal type
    • Added ServiceName property to Cloud class
    • Further reduced size of saved cloud data
    - Jan Ivar
     
    PixelEnvision likes this.
  37. relayOne

    relayOne

    Joined:
    Sep 28, 2012
    Posts:
    23
    I'm using CloudOnce 1.8.1. I'm getting this reported warnings about downloading over http on iOS. Do you know what is causing this? BTW, I'm also seeing similar errors from the facebook plugin, and even UnityIAP. Is this so common? Seems a little scary.

    Here are snippets of warnings from XCode:
    2016-05-03 00:18:13.693 [568:605615] You are using download over http. Currently unity adds NSAllowsArbitraryLoads to Info.plist to simplify transition, but it will be removed soon. Please consider updating to https.
    Data saved to local cache
    UnityEngine.Logger:Log(LogType, Object)
    Trollpants.CloudOnce.Internal.DataManager:SaveToDisk()
    Trollpants.CloudOnce.Internal.Providers.iOSCloudSaveWrapper:Save()
    ... (my code)
     
  38. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Hi @relayOne, that warning is nothing to worry about for now. It shows up any time your app accesses anything through http instead of https. At some point in the future Apple may block http traffic and only allow https.

    - Jan Ivar
     
    Last edited: May 6, 2016
  39. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Version 2.2.1 has been submitted to the Asset Store!

    Release Notes
    • Cloud saving can now be toggled on/off post initialization, will save to disk regardless
    • Save method now saves to disk on unsupported platforms
    - Jan Ivar
     
    Last edited: May 7, 2016
    PixelEnvision likes this.
  40. andyl_dc

    andyl_dc

    Joined:
    May 12, 2016
    Posts:
    5
    Nice plugin. It helped us a lot to meet our goal with just a few clicks.
    But may I have a few requests to make it more optimised for larger scale of development?

    We are using CloudOnce v2.2.1. First of all, I noticed that the callbacks are not run in the main thread. Can you please fix it? In my test scene, I keep getting "get_isActiveAndEnabled can only be called from the main thread." error after the "OnSignedInChanged: Signed In" message. The scene contains your AchievementsButton.cs, LeaderboardsButton.cs and GoogleSignOutButton.cs and some of my custom scripts to display logs in build. My colleague also got the main thread error message so he had to comment out the call to GetPlayerImage() in GooglePlayGamesCloudProvider.OnAutenticated() (by the way, typo?)

    Another issue is that there are quite a number of hardcoded paths in your plugin. It is quite painful for us to update the plugin since we have our own project structure to organise different plugins (hence we can share plugins between different projects via symlinks in OSX). It will be better if you can move all hardcoded paths, including those for Android plugins, into a separated file, so we don't need to search through multiple scripts. :)
     
  41. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Hi @andyl_dc,

    I just received a very helpful e-mail about a fix for the OnAuthenticated threading issue. I'll include the fix in the next update of CloudOnce. But for now you can replace the OnAuthenticated method in GooglePlayGamesCloudProvider with this:
    Code (CSharp):
    1. private void OnAutenticated()
    2. {
    3.    GooglePlayGames.OurUtils.PlayGamesHelperObject.RunOnGameThread(() => {
    4.      cloudOnceEvents.RaiseOnSignedInChanged(true);
    5.      Logger.d("Successfully signed in to Google Play Game Services.");
    6.      IsGuestUserDefault = false;
    7.      GetPlayerImage();
    8.      PlayGamesPlatform.Instance.LoadAchievements(UpdateAchievementsData);
    9.    });
    10. }
    And I'll fix the typo in the update as well, thanks for pointing it out ;)

    I like the idea of having all the paths in a single file, I'll make that happen!

    - Jan Ivar

    Update: It appears that the callback threading issue was largely due to bugs in the 0.9.32 version of the official GPGS plug-in. It has been addressed in the latest version, that I'm now including in the next CloudOnce update.
     
    Last edited: May 18, 2016
  42. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Version 2.2.2 has been submitted to the Asset Store!

    Release Notes
    • Updated GPGS plugin from v0.9.32 to v0.9.33, this should fix threading issues with Google callbacks
    • Fixed rare case where OnInitializeComplete would not be called
    • Put hard-coded paths in single class, for easier alteration of folder structure
    - Jan Ivar
     
  43. djfrail

    djfrail

    Joined:
    Jan 16, 2014
    Posts:
    124
    Hi - I'm on CloudOnce 1.7.2 and want to upgrade to the latest 2.x.x. version. I saw the post earlier here that warned about having to delete the previous CloudOnce installation. Can you lay out the steps here for safely upgrading to the new version, including what exactly to delete? Thanks.
     
  44. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Hi @djfrail, best thing to do is first create an empty Unity project and only import your current version of CloudOnce. Then you will have all the files that should be deleted before upgrading to the new version. If you don't have a copy of the unity package file for v1.7.2, send me an email and I'll send it to you.

    After deleting the previous version, import the new one. Now you need to do a "search and replace" run through your scripts for "Cloud.Provider." and replace it with "Cloud.". That should fix everything, but if your project still doesn't compile, you'll need to investigate each of the remaining errors individually. For example some events were renamed, so you may need to figure out the new name (should be pretty straight forward).

    - Jan Ivar
     
  45. Froghuto

    Froghuto

    Joined:
    Oct 4, 2012
    Posts:
    61
    Hi, I'm using Cloudonce 2.2.1 and when building on android devices I get the following error:

    I found a thread about this error here: https://github.com/playgameservices/play-games-plugin-for-unity/issues/280
    But this should be fixed if using the latest GPGS so I'm not sure what the problem could be.
     
  46. djfrail

    djfrail

    Joined:
    Jan 16, 2014
    Posts:
    124
    Thanks - sent an email. I'm using Unity 4.7 - do you think CloudOnce 2.x will work with that?
     
    Last edited: May 19, 2016
  47. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    @djfrail sorry, Unity 4 support was discontinued in v2.

    - Jan Ivar
     
  48. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    @Froghuto, v2.2.1 doesn't have the latest GPGS, but I have included the latest version in v2.2.2 which I sent to the Asset Store yesterday. It takes a couple of days for it to come online in the store because it has to go through review.

    Update: However I'm not sure that error is caused by a bug in GPGS, it looks like you're actually missing the GPGS libraries. Have you done the GPGS setup in the CloudOnce editor? That should import several libraries from the Android SDK. You also need to make sure you have downloaded the necessary libraries to the SDK before attempting to import them to Unity. You can find a list of the required libraries in our Getting Started guide here: http://trollpants.com/cloudonce/gettingStarted.html#requirements

    - Jan Ivar
     
  49. Froghuto

    Froghuto

    Joined:
    Oct 4, 2012
    Posts:
    61
    It seems I was using an old version of support annotations jar, with the latest version it works now, thank you very much for the fast help!
     
  50. Trollpants

    Trollpants

    Joined:
    Jun 22, 2014
    Posts:
    113
    Happy to help :)

    - Jan Ivar