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.
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.
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).
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.
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.
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?
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.
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?
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.
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.
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.
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
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:
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).
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!
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.
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.
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:
www.Send();
to:
www.SendWebRequest();
Thats it for now, that should handle any issues until I can elaborate and a new version be released.
Thanks!