Search Unity

[DEPRECATED] CloudPlayer (Formerly "CloudBackend")

Discussion in 'Assets and Asset Store' started by Novack, May 30, 2016.

  1. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    CloudPlayer offers a simple, flexible and effective backend solution, while avoiding the need for special hosting requirements, and the uncertainties introduced by third party services.


    From the Unity Editor or virtually any Unity build target(1), CloudPlayer connects your app or game with a web service -hosted on your Google Drive account-, that enables you to manage player signup, login, game stats, game statistics, etc.

    CloudPlayer uses the principle behind Google Sheets for Unity, enabling Unity projects to make use of cloud environment services, like Google Spreadsheets.


    The provided example

    Using this simple but remarkable mashup of technologies, CloudPlayer opens the field of cloud services, bringing the power of Google Drive to the table, while liberating the developer from worries about authentication, dependencies, extra costs, and over complex scenerios.

    The source code is included, which means optimal flexibility.


    Changelog:
    1.0 First Release.
    1.01 Asset name change.


    (1): Exceptions are only web build targets: WebGL coming on future versions. WebPlayer, deprecated by Unity, will not be available.
     
    Last edited: Aug 16, 2016
  2. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    Last edited: Aug 16, 2016
  3. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,436
    Hey I'm having a hard time understanding the pipeline to get this setup. Could you explain the workflow a bit more literally?

    For instance, what are the actual requirements for the game to read/write to the cloud? From the docs, it seems like there is a webservice but I can't really figure out how to set it up. If I copy the Code.gs file to my Google Drive then there isn't any way to see the code like your linked example has as double clicking it throws the generic No Preview box. And, does it have to be written in js?

    Just looking for something more layman since I am not familiar with cloud stuff or webservices. I'm looking into putting a SQL DB on Drive and read/writing from multiple sessions of an app. I have it working locally, now I'm trying to move the db into the cloud.
     
  4. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    Hello LaneFox, thanks for reaching out!

    It seems that you're not familiar with some basics of Google Drive, which is asumed in the manual you already manage.

    First, you need to copy the provided files to your own drive, using the links provided. This links simplify the process of creating copies of the files in your own GDrive. Then you have to associate the files with the specified programs (in a similar fashion that in your OS). For this Google Drive has some simple setup steps. Contact me by email if you can't do the association.

    This has nothing to do with SQL, so Im afraid on that regard, I will not be able to help you.

    CloudBackend is quite practical for developers that know the options available for game backends, but is not a layman solution. Its expected for the developer in charge of ANY backend solution, to work, in order to make use of the service/product: is always expected to accomodate the facilities to his own needs. So in escence, you need to be versed on topics related to online services, and at least on this case, you need to be able to customize the webservice code to your own needs.

    If you have specific/technical questions on the proper setup, don't doubt on contacting me by email (please don't share technical aspects on the forums).
     
    Last edited: Aug 17, 2016
  5. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,436
    I sure don't have any cloud/web service experience, but I do have basic knowledge of Drive and how it works because I use it daily. I'm simply not aware of how to make it work as a cloud for my app which is why I bought CloudBackend - so I didn't have to deal with digging into google's docs for Drive, App Script etc to figure out how to wire everything together. But it seems like I'll need to anyway to get the tool working since the docs are vague on setting it up.

    I didn't expect any solution for my SQL scope, I was simply mentioning what I intended to use it for in case you knew of some reason that is not feasible to use Drive for that. Like I said it works local, but I want to move this existing system to the cloud.
     
  6. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    I think the docs are pretty precise on setting it up. But who knows, maybe need some more work? The developer guide was written from scratch, after more than 2 years of experience explaining how to setup a similar assets with houndreds (800+) of users.

    Please, if you need further assistance, do contact me by email, I will help you in anything I can. For a few weeks I'd rather not offer support through the forums, with the recent forum change and roll back, I got many posts lost and even private messages deleted.
     
  7. Rutger

    Rutger

    Joined:
    Sep 17, 2013
    Posts:
    7
    Hi,

    Looks like we can use this for our needs. But wanted to verify before purchasing:
    Does it (indeed) allow the possibility to store and retrieve values from a Google Sheet, during runtime?
    Am I right to assume it then stores and retrieves string values only?
    How does it, if it does, store this value for a specific user / device?
    Does it use "SystemInfo.deviceUniqueIdentifier" for this? Does your plugin therefore work on Android devices?

    Thanks in advance for your answers.
     
  8. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    Hello @Rutger

    It does indeed allows to persist and get data from a Google Spreadsheet, at runtime. It is a more focalized implementation of "Google Sheets For Unity" which is a more generalistic implementation of the same principle.

    CloudBackend includes an example implementation that elaborates on how to handle player profiles, from signup and login to player stats and game statistics.

    It can handle other types than string, but the subset of supported types is limited (int, float, string).

    For storing and fetching values and profiles, as well as for signup and login, it includes a small API that is also used in the example. All it does from Unity side is UnityWebRequest calls, so its virtually available on any Unity target platform (read the description for more details).

    OH, and it does not use SystemInfo.deviceUniqueIdentifier, it uses an internally generated Uuid, so you can handle more than one profile on the same device.

    Hope it helps!
     
  9. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    By the way, this extension needs at least an intermediate level of programming in order to use it for you own purposes.
     
  10. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    CloudBackend has been rebranded now as CloudPlayer!
     
  11. fathahnoor

    fathahnoor

    Joined:
    Apr 3, 2012
    Posts:
    7
    I have a question regarding this interesting extension. One of my app's functionality is to save/load some files to Google Drive, can it be achieved using this extension?

    Thanks
     
  12. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    Hello @fathahnoor,

    That would be more related to CloudImages rather than CloudPlayer, as the later is more oriented towards storing data values, not files. However, CloudImages would requiere some work to make it save general files, as at the moment only works out of the box for image files types. I have been considering adding that feature, but have not found the time window.

    Edit: Btw, these extensions use a predefined developer-owned Google Drive, is not for player interaction with their own accounts.
     
  13. DADA_universe

    DADA_universe

    Joined:
    Mar 14, 2015
    Posts:
    31
    Hi Novack,

    If I already have Google Sheets for Unity and I can get by sending and receiving data to / from my spread sheets in Drive, would there still be any need for Cloud Player? Not clear what exactly the distinction is. I also remember you mentioning somewhere that your were trying to streamline these assets into one package, is this still the plan? Asking to know how best to build projects around these assets.
     
  14. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    Hello @DADA_universe,

    There is no particular need for CloudPrefs if you already own some parent asset and you feel confident working with it client/server side. Only thing CloudPrefs add to it is a wrapper for using a likewise API than the one Unity provides for PlayerPrefs, and of course, the server code to deal with the approach.

    I'll poke you through PM again, with the details.

    Regarding the combined asset, is still my plan, but has become a long term endeavour as my daily work consumes most of my time at the moment.
     
  15. pigboy

    pigboy

    Joined:
    Feb 18, 2013
    Posts:
    2
    Hello Novack
    I saw you mention earlier about save and load file to google drive
    I wonder that is this function implement yet?
    If not is it hard to implement . I just want to upload text file and download text file
    Thank you
     
  16. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    Hello @pigboy. I have not implemented new features to CloudImages yet, so same rules than before apply.
    Cant give recommendations as its entirely up to your technicall skills, but using this assets you have two options:

    1. Using CloudImages, which requires with some added work from your side to make it work with text files (as said, at the moment only works for image files types).
    2. Using Google Sheets For Unity. I would say that you can have the content in a spreadsheet, manage it using the asset, and then download the data and generate the file at your own needs.

    Nothing out of the box for your current needs, sorry!
     
  17. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    164
    Can this be used for device persistence? By that I mean: saving the state in the cloud, open the app on another device and it pulls from the cloud... can this plugin do this? I need the player's state to synch across their devices.
    Thanks in advance.
     
  18. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    Hello @shadowfork sorry for the late reply.

    Yes indeed, this could be used as you describe, to persist player data across devices.
     
  19. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    @Everyone a quick fix/note:

    On late Unity versions the WebRequest API has been modified, and the Send() method has been marked as obsolete.
    This may result on annoying console warnings, and some people has even reported malfunctions.

    This affects all the Cloud Suite assets: Google Sheets For Unity, CloudPlayer, CloudConsole, CloudPrefs, and CloudImages.

    To fix this, until I can update the assets to new versions, please open the <*>Connector<*> class (naming varies depending the asset) and change the line:

    Code (CSharp):
    1. www.Send();
    to:
    Code (CSharp):
    1. www.SendWebRequest();
    Thats it for now, that should handle any issues until I can elaborate and a new version be released.
    Thanks!
     
  20. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    Quick reminder: CloudPlayer is part of Asset Store May Madness Sale, and is 30% OFF! :)
     
  21. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    Upcoming Google Drive For Unity is progressing real nice!

    For those that dont know yet, Im reworking and integrating together the suit of CloudTools, adding more features and improving it all.

    So far I have rewritten the asset, added Google Drive files and folders handling, merged (re-implemented) CloudConsole and CloudImages basic ideas, improved access concurrency, added more examples for practical cases, and better Editor use cases, and the API has grown in options and flexibility!

    In relation to CloudPlayer, I just finished implementing session context based queries: so despite the new library includes the stateless queries approach I did on Google Sheets For Unity, will also offer a login session (including registration), with a token and a session context similar than CloudPlayer does.

    For transparency, I'd like to mention that Im not yet sure if CloudPlayer will remain on the store after the new asset be released.

    Next step is... working on the dreadful WebGL support! Hope to have news soon.
     
  22. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
  23. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    646
    Heads up! From this day, this asset is being deprecated, in favour of the new main version of
    Google Sheets For Unity.

    Check the new asset details:
    [Forum Thread]
    [Store Page]