Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[DEPRECATED] CloudImages - Google Drive as your images storage!

Discussion in 'Assets and Asset Store' started by Novack, Jul 21, 2016.

  1. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Using CloudImages enables Unity3D developers to save and get images from Google Drive, one of the most simple and widely available cloud environment services: no more extra costs or over complex scenerios!


    Liberate your project and team from special hosting requirements, external libraries or exotic third party services! CloudImages offers a simple, flexible and effective solution, while avoids introducing any hassle.


    Inluded Demo

    By simply incorporating a small c# class to your project, based entirely on Unity native API calls, you will have a powerful tool for saving screenshots to the cloud, getting texture updates to your game, saving player profile pictures, etc...


    From the Unity Editor or virtually any Unity build target(1), connect your app or game with a web service hosted on your Google Drive account, and open the field of cloud services bringing the power of Google Drive to the table!

    Disclaimmer: This package requires intermediate programming skills in order to understand and use the asset for your own purposes.

    (1)Important: Regarding web build targets: WebGL coming on future versions. WebPlayer, deprecated by Unity, will not be available.


    Website
    .
    Blog.
    Facebook.
    Twitter.
     
    Last edited: Jul 29, 2016
    iamsam likes this.
  2. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
  3. steffanPL

    steffanPL

    Joined:
    Oct 9, 2014
    Posts:
    40
    Hi there,
    I wanted to buy your asset, but firstly need to make sure if it supports what I want to achieve.

    From user perspective, I want to give player option to login to their google drive account, display list of images from drive, and then let to chose one of them and use in the app.

    So is it possible to login with credentials entered in real time ? And is it possible to display list of all folders/files stored in drive ?

    Cheers !
     
  4. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello there @steffanPL!

    Im afraid thats not how CloudImages work, and cannot help with your needs. The asset is transparent to the user, and the Google Drive to access is predefined by the developer. Cheers!
     
  5. steffanPL

    steffanPL

    Joined:
    Oct 9, 2014
    Posts:
    40
    Ok, let me know if one of your update will add that kind of functionality.

    Thanks !
     
  6. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    I too would like that functionality. How hard would it be to change the plugin so the app user can access files stored in his own Google Drive account?
     
  7. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hey @arkon thanks for reaching out.

    Accesing the images files would not be an issue (they can be shared publicly after all!), but accessing is only half the functionality... you would not be able to save to players drives.
     
  8. steffanPL

    steffanPL

    Joined:
    Oct 9, 2014
    Posts:
    40
    That already would be great - once you will add this feature, let me know- I will buy it :)
     
    Novack likes this.
  9. WagDan

    WagDan

    Joined:
    Nov 7, 2014
    Posts:
    37
    Hi Marcos,
    Just imported and looking at CloudImages. We already use and like GSFU :)
    I see one issue for us - we want to download all images by their name nor their id. As images will be added to the drive over time and we can anticipate their names, we will not at build time know their id. Is there a way of downloading all images from a folder?
    Very many thanks and hopefully happy new year.
     
  10. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello WagDan! Happy new year to you too.

    Sure what you need can be done, but requires a bit of work on the webapp script side. You can work with file names, or get all files in a folder. It is not implemented in the example, but should ve very easy to add to your project, just poke the google scripts api docs. If need some orientation with those docs, contact me by email I can give you some directions :)
     
  11. WagDan

    WagDan

    Joined:
    Nov 7, 2014
    Posts:
    37
    Thanks Marcos! Sorry for late reply. Will have a poke as you say and get back if i get stuck.
     
    Novack likes this.
  12. WagDan

    WagDan

    Joined:
    Nov 7, 2014
    Posts:
    37
    Hi Marcos,

    we've had some fun trying to get GSFU and CloudImages to work on iPad without randomly crashing and came across this:
    On this this page : https://docs.unity3d.com/Manual/TroubleShootingIPhone.html

    "WWW downloads are working fine in Unity Editor and on Android, but not on iOS
    Most common mistake is to assume that WWW downloads are always happening on separate thread. On some platforms this might be true, but you should not take it for granted. Best way to track WWW status is either to use yield statement or check status in Update method. You should not use busy while loops for that."

    So i changed the CloudConnector and CloudImagesConnector 'ExecuteRequest' code from 'www.send' to 'yield return www.send' and took out out the while (!www.isDone) loop and now all is well.

    As this applies to both assets, i'll copy this to the GSFU Forum, too, hope you don't mind.
     
  13. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Thank you @WagDan for the tip.

    I would need to study the situation more though. Because precisely the use of a coroutine is required as we almost never have access to other threads when using the Unity API, so a while loop executed among several frames should have the same practical effect, and more flexible, than using Update() for the same purpose. As you can notice, the while loop *is* yielded. So... thinking more about it, not sure whats going on in your case, because I had no other such reports like yours! But will certainly keep it mind, just in case. Thanks!
     
  14. Juanola_

    Juanola_

    Joined:
    Sep 29, 2015
    Posts:
    38
    Hi Novack! Quick question before buying, does the plugin work with Android?
     
  15. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello @Juanola_!

    It uses Unity UnityWebRequest API, so it works on any plataform supported by Unity (including Android) ;)
     
  16. NewYorkHOK

    NewYorkHOK

    Joined:
    Oct 13, 2017
    Posts:
    5
    Hi Novack,

    I am thinking about buying your asset but want to know if it can do what I need. I want to be able to pull images from a google drive to display onto a surface in Unity. Does this asset need to be setup with the google drive API or does it make connecting the Google Drive API not necessary? I was wondering if you could send me an example project file or the dev guide? Thanks Novack
     
  17. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello NewYorkHOK,
    The purpose you describe is well covered by CloudImages. The asset does not need drive API, it uses a webservice deployed on your own google drive as a gateway. Is simple, fast and doesnt require runtime google athentication nor Drive api in the unity project.

    Im afraid to say I dont have any example project or dev guide to provide, all the material (including a detailed developer guide) is part of the package.
     
  18. Maicol-Face

    Maicol-Face

    Joined:
    Jan 12, 2015
    Posts:
    3
    Hi Novack,
    i try your CloudsImages demo on my ipad. i follow your instruction and lunch the app by xcode. Everythings seems to work correctly and when i push the button to save a screenshot and send it to my GoogleDrive in the console there's "Image Saved". But in my Google drive there isn't anything about new screenshot. Do you know something about it? Maybe i have to change something about Coroutine "TakeScreenshot"? Can you help me please?
     
  19. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
  20. Homeak16

    Homeak16

    Joined:
    Feb 27, 2017
    Posts:
    19
  21. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    I read your email, flag you made it work using CloudImages :)
     
  22. eyalfx

    eyalfx

    Joined:
    Oct 8, 2010
    Posts:
    108
    Can we use the api to upload other files like .wav or .txt ?
    Thanks
     
  23. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello @eyalfx you could do that, but its not an out of the box feature, it would require some changes on your part.
     
  24. Maicol-Face

    Maicol-Face

    Joined:
    Jan 12, 2015
    Posts:
    3
    is'it possible save screenshot in a specific folder of my Google drive? how? thankyou!
     
  25. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello @Maicol-Face,

    Yes is possible. You need to tweak the webservice script to create a folder, or create the folder by hand and then get the folder by id.

    Open the Image Handler script on your Drive (if you didnt already, you may need to associate the script to the script editor), and around ln 49 look for this:
    Code (JavaScript):
    1. var file = DriveApp.createFile(fileBlob);
    and change it to:

    Code (CSharp):
    1. DriveApp.createFolder('YourMainFolder').createFolder('YourSubfolder').createFile(fileBlob);
    or

    Code (CSharp):
    1. var folder = DriveApp.getFolderById(id); // you get the folder id the same way you get the spreadsheet file id.
    2. folder.createFile(fileBlob);
    Remember that after making changes to the webservice you need to save a new version in the Dribe Script editor and redeploy the webapp!

    Good luck! :)
     
  26. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    @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!
     
  27. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    Can you download Asset Bundles using this plugin?
     
  28. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello @bjornrun,

    You can certainly download any files from a GDrive account using this plugin, though may need some tweaks in order to do so. Out of the box only offers image handling, and although is among my plans to extend the functionality, I have not had the time to do it.
     
    bjornrun likes this.
  29. DADA_universe

    DADA_universe

    Joined:
    Mar 14, 2015
    Posts:
    38
    Hi, @Novack please can you confirm the current status of Cloud Images with regards to compatibility for WebGL builds? Especially with the current WebGL implementation in Unity 2018+ ?
    I'm asking because the asset store page still says WebGl compatibility is coming soon.
    thanks.
     
  30. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello @DADA_universe. I have not had time between contracts yet as to dedicate to make it work on webgl, so it doesnt support it yet.
    As for the rest, it should work just fine with latest Unity.

    Thank you for contacting!
     
    Last edited: Nov 7, 2018
  31. DADA_universe

    DADA_universe

    Joined:
    Mar 14, 2015
    Posts:
    38
    Thanks for the feedback. All the best!
     
  32. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hey peoples!

    I finally got some time to work on this, and I've decided to design a new asset related to Cloud Images (and to Google Sheets for Unity). Among other things, general files handling is being incorporated, as some people have requested :)

    So: "Google Drive for Unity" is coming!

    As said, Im planning some new features, and likely will pack all the current Cloud Tools into a single cohesive multipurpose asset, including different example cases.

    Will have news soon!
     
    Last edited: Dec 24, 2018
  33. DADA_universe

    DADA_universe

    Joined:
    Mar 14, 2015
    Posts:
    38
    Great news. Looking forward.
     
    Novack likes this.
  34. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    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]