Google Sheets For Unity allows to interact with Google Drive environment, at runtime or design time.

This unlock a world of posibilities: virtually free backend, for collaboration in design and development. Customize your workflow with flexible and solid well known solutions!

With more than 5 years on the Unity Asset Store, this asset is the result of actual field work, and with the accumulated experience of having thousands of users, it represents a classic and default choice for simply and efficiently connect Unity and Google Spreadsheets.

Check the online demo above!

Just set the spreadsheet id on the input field and check how the spreadsheet is filled with content, updated, and you can change content on the sheet and check how the demo will retrieve the fresh data upon request.

Highlights:

✔ Read & Write to spreadhseets.
✔ Upload & Download files: binary, text, images.
✔ Works with desktop, mobile and WebGL.
✔ Source code included.
✔ No Google account credentials required on the Unity side.
✔ Works with private and public Google spreadsheets.
✔ Free SKDs dependencies: no Google Data API required, standard Unity UnityWebRequest calls.

Multiple barebone examples included:

• Spreadsheets basic use.
• Files: loading and saving from both, disk and Google Drive.
• Images: load from disk or screenshot, save and retrieve from Google Drive.
• Simple localization example.
• In-Editor use demo.
• Unity Console Logs to cloud example.
• Session context: use a custom player login system.

Check the screenshots!

How it works?

The Unity side API enables working with spreadsheets as object tables (each row is an object), or just cell by cell. Creating and retrieving folders, text and binary files. Saving and loading png or jpg images files.

This client connection on Unity side provides practical queries that will cover most basic interactions. It connects to a webservice which is deployed on the Google Drive developers account. The source code for both, the Unity API and the webservice are provided, enabling tweaks on the available queries, or full customization and adding new posibilities!

Documentation

Unity API docs are public and available online here.
Complete developer guide is available with the asset in PDF format.

Compatibility: Tested with Unity 2018.3 onwards.

Package Contents Peak


Important Disclaimmer!

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

Lite version

The original version has been rebranded "Lite" edition, to denote the difference with this new asset. It can be found at the Unity Asset Store.

The new version, available on this page, encompasses wider use cases, including and extending capabilities that used to be scattered among 3 or 4 other assets (siblings from GSFU, that I named "CloudTools").

In essence, the Lite version focuses exclusively on Google Spreadsheets, while the main version goes a bit beyond.

Useful Links

Unity Forum thread
Client API Reference
Facebook
Twitter

Check more tools

Cloud Console For Unity

StatusReleased
CategoryTool
PlatformsHTML5
Rating
Rated 5.0 out of 5 stars
(4 total ratings)
AuthorNovack
Made withUnity
Tagscloud, database, drive, gamedev, google, persistence, sheet, spreadsheet, tool, Unity
LinksUnity Forum, Twitter/X, Facebook, API Reference

Purchase

Buy Now$23.00 USD or more

In order to download this tool you must purchase it at or above the minimum price of $23 USD. You will get access to the following files:

GoogleSheetsForUnity.unitypackage 694 kB

Development log

Comments

Log in with itch.io to leave a comment.

Hello, I have bought this pack and sended some messages to twitter for some support. Please hope you can help me out on twitter. 

(1 edit)

Hello @MSGameDev!

Sorry I am not able to provide any support via twitter, please write me to the email address detailed in the developer guide.

Thanks!

Hola, igual hablo español jeje. Te escribí un correo el 25 de marzo. Igual esperando respuesta. 

Hola, no tengo ningún correo del 25, podrías enviarlo nuevamente, asegurándote de que la dirección sea la correcta?

Listo compañero, es el que esta en el pdf no? 

I dedicate this song to the creator, thank you

Haha, that made my day! Much appreciated, hope the package helps you in many projects! Sorry about the delay btw, for some reason Im not receiving the notification emails from itchio.

(+1)

dude your package is a life saver and has opened so many doors for my projects, endless thanks.

Does it work in Unity 2022 and newer versions?

Hello there, yes it does!

hello

can you help me with new google sheets setup?

Google sheets and plugins manuals look different and can't be found Spreadsheet Id,Service Password

and can't find server side app like setup “”pass code”.

maybe help me a new operate video tutorial.

Hey i just bought this tool and was trying to follow the guide on setup but it looks like googles ui and script system changed. Im not sure how to get the passcode if it uses it anymore. When i do it with the default passcode or just no passcode it says invalid credentials when i run the code. What would you recommend i do? i have not tried the other login method yet.

(1 edit)

Hello there, sorry I missed this post, for this can you cant me to the support email? (address is on the dev guide pdf). I can give you steps to setup on the new Google script editor.

hi 🌼 Is this tool compatible with the google sheets v4 API? I was using a similar tool up until this week when the old API was deprecated leaving it nonfunctional

(2 edits) (+2)

Hello @Isobel, thanks for contacting.

Google Sheets For Unity does not use Google Data APIs (as Sheets API), instead it uses a different method for communication with the spreadsheet (also using Google's own infrastructure), effectively bypassing all the hassle :)

So in practical terms, it will work, no need to worry about API keys, API versions, OAuth, and so on.

Just purchased, great idea... doesn't work in Unity 2020.  Unity Web Request has been update/changed/deprecated and so a bunch of this script doesn't seem to work.   Any update coming?

Hello, apologies for the leave of absence. I had to attend some family and health issues, and had no opportunity or time aside from that, to offer the usual support for Google Sheets For Unity. I will be slowly catching up and get back to you with some help.

Thanks for the reply.  Family/health comes first.  I ended up just writing a Google Apps Script to do what I needed so no rush on my behalf (if you release an update, I may go back to yours and integrate).  Thanks for being an active supporter of your code!

Hello again. I have just tested it on Unity 2020.3.0f1 and it works as expected. The upddated webgl demo is built on that Unity version as well, you should be able to see it working on this same page.

Can you elabotate a bit on the issue/s you was experiencing? I see no breaking changes on Unity's UnityWebRequest that affect Google Sheets For Unity.

Thanks again for the generous patience :)

(1 edit)

Would this work to track user data or is there a limit to how many people can add data at once? I have a WebGL tradeshow app that captures user requests. If the show is really busy would Google reject data going in from lots of users?

Hello, apologies for the leave of absence. I had to attend some family and health issues, and had no opportunity or time aside from that, to offer the usual support for Google Sheets For Unity. I will be slowly catching up and get back to you with some help.

(+1)

There are indeed concurrency limits when accepting requests, you can check more details regarding quotas and limitations here: https://developers.google.com/apps-script/guides/services/quotas

However, I would tend to think that for your use case, you should be within safe bounds. Thanks again for your patience.

(+2)

Hello! Just wondering, if I were to add an image to a google sheet using image, insert, image in cell... would I be able to retrieve that image using this plugin? I know you can specifically choose to use a google drive image for the cells, and I though perhaps getting the cell data in that case would return the Drive ID?


My use case is I was hoping to be able to add flag images to a google sheet, and use the images as UI sprites at runtime.

Cheers!

(1 edit)

Hello there! Thanks for contacting.

You can access images using Google Sheets for Unity, but not from the spreadsheet itself, but directly from gdrive. So in your case would be as simple as picking a naming convention, and having the image name (or image id) on the sheet, then using the plugin to retrieve the image itself, after retievieng the table data.

Hope it helps!

(1 edit) (+1)

UPDATE #1: just wanted to say that I have bought the asset and holy jeez, it works... as advertised. Just wanted spreadsheets but it's amazing how it has so much more. Can create files, retrieve them via id, images, raw text file/json's, etc. Truly amazing. 5 stars from me.

------ ORIGINAL POST BELOW ------

Hi! This asset looks interesting, however I seem to have issues running the embedded game in itch.io. 

Have tried both on Safari and Chrome on a Mac, maybe I'm not putting the Spreadsheet URL right, it looks likes this:

(on chrome is the same message but on a different popup style)

Gonna buy it soon and give it a try but wanted to point that out in case it also happens on an actual local Unity project build.

Will be using it as a sort of level editor by marking cells with information in it and treating it as a 'grid'

Hello, and thanks for the report. The error can be ignored, is only related to the method used to enable copy/paste into the unity app fields! Sorry for the inconvenience, I have been meaning to fix that for some time now, but have not found the right time.

Thank you for taking the time for posting, and thank you so much for your kind words, really happy to read that!

Hi,

So I have a question too:

I need to use the tools like they are used in the example here on itch, but that example is not available in your asset folders. 

I need to be able to change add data to a spreadsheet using spreadsheet id and no login.. 

Hi there CoBon, 

The online demo should be available as a separate download on itchio. But regardless, the requirements you mention are core to the asset (the demo is only using functionality from the main codebase). In short: you will be able to do what you need, even without the demo, but the usual disclaimmer applies: it requires coding skills!

Hope it helps!

Hi Novack. The library looks really promising, but I haven't been able to get it to pull any data yet. I believe that I've wired everything up correctly (as per the docmentation) but whenever I try to start pulling the data (I'm starting with a GetAllTables() call), I just get an Undefined Server Response. Digging into the resulting HTML response I see the error text: "Sorry, unable to open the file at present. Please check the address and try again".  I've double checked all of my connection details and they all look correct.

Any suggestions on what I might be doing wrong?

The only possible anomaly that I can think of is that this spreadsheet is stored inside a company Google Suite account, so when I expose the sheet, the least restrictive access I can give is to "anyone within the company" (rather than "Anyone, even anonymous".  Is this supported?

Hi @buzzrick, thanks for contacting.

Indeed, the endpoint wont be reachable unless you use the access level described in the documentation.

You have two paths from there:

  • You escalate the permisions, indeed allowing for anonymous access (this can be enabled in the Google admin console from Google Apps).
  • You deploy the webapp on a different google account where you can apply the less restrictive permissions, and share the spreadsheet with that account.

Hope it helps :)

Thanks @Novack. After digging into our corporate G Suite admin portal and finally figuring out where to change the obtuse settings (it was in the Google Drive settings within Apps), and then figuring out a way to limit who had access to change those settings (using Groups) we were finally able to expose and publish the endpoint. 

Now it's working like a charm!

Thats great! thanks for letting me know :)

(1 edit)

Hi Novack, is the Pro version going to be avaliable in the asset store/Unity package manager soon? It's way better for keeping track of the updates. I would like to buy the full version but probably will buy the lite only because of this.

Hey, thanks for contacting, and for your interest.

I have no plans to publish the full version on the Unity Asset Store. If helps, you can follow me on itchio, which works perfectly fine to be updated, and also when I release updates, purpossedly will sent notifications to all followers and/or owners.

If you prefer to go with Unity Asset Store, will have to be the classic (Lite) version, but good news: is on sale, 50% off for 3 more days :)

Hope it helps!

(1 edit)

Hello, is it possible to format cells in spreadsheet? For example when I want to set the background color of the row when using CreateObject method. Or setting width/height/color/font of individual cells? There is nothing about formatting in the documentation.

Hey there @udubaso, thanks for contacting. You can manually format the cells, it wont interefere with the data functions of GSFU. However there are no features in the asset to handle cell formatting programatically. Maybe in some future release I will include it!

Hope it helps :)

Thanks for the reply. Of course, I meant if it's possible to do the formatting programmatically (though I admit the way I wrote the question wasn't the best :D) Of course, you can change everything you want directly in Google Spreadsheets, but imagine you have hundreds (or thousands) of rows and columns. GSFU's purpose is exactly that - to make handling the data much easier and more convenient. So your statement "You can manually format the cells" is in direct contradiction with the very same reason why you created this plugin in the first place.

Heya, yes you're right! I only expressed that because sometimes I received questions about the safety of applying manual formating to the cells, in regards to the data parsing integrity.

While I have not many requests for cell formating, it is indeed something that I could add, so I hope to be able to work on this on future releases (no ETA though).

I get the following error when trying the demo above: 

An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
TypeError: null is not an object (evaluating 'document.getElementById("canvas").style')

Then, attempting to "Create Character Table/Worksheet", it says:

Connection error after 1.3 seconds: Unknown Error

(3 edits)

Hey. You can disregard the javascript error, is a dom issue on the code used to type or paste the spreadsheet id.

Regarding the second issue, I just checked and is working as expected, please double check your spreadsheet id, and follow the instructions (described on the demo itself).

Remember that the spreadsheet needs public permissions (only required for the public demo).

(+1)

Figured it out - I had made it public, but the default is read-only, and I didn't notice!

Suddenly I'm getting connection errors with my sheet; also with the example here. What could be the reason?

(-1)

Hey there, checking it. In the meantime, would you elaborate on what errors are you getting? Thanks!

Im not getting errors here on the demo on this page. Can you describe more whats happening for you?

(1 edit) (+1)

Hey! Sorry, it was kind of a false alarm. Seems like I had to re-authenticate for the script again, even though I didn't change anything. The error at the demo was me being an idiot.

(+1)

Thank you for letting me know, cheers!

Ieps! great tool.

I have two questions though. How do you properly import data with columns that have a formula like this '={OtherSheet!A:A}' ? right now importing that data causes to import all the spreadsheet rows, I can filter the ones that are valid but maybe there is a better solution. The second question is related on how to securely handle the password in the connection file that is only needed in the editor (not store it in the repository), do you have any recommended solution to that? right now I'm just using a file ignored in in git that contains the password.

Regards!

Hello @Swing Wren. Sorry about the delay coming back to you. The dayjob has been very pressing and the time for GSFU support has been tight.

Im not sure I understand correctly the case. What you mean "importing that data causes to import all the spreadsheet rows"?

Regarding the password, your approach seems fine, however it may be limiting if the project uses any sort of CI/CD, so if you use for example Unity Cloud Build, you'll need to include the pass in the repo. Otherwise is good, just make sure that the file is included in the build.  I dont have any particular recomendations, as usually the people involved in the project needs access to the service, and is unlikely to result feasible for the devs to not count with the pass.

Thanks for the reply!. What i mean is that using

ConfigRaw configRaw = JsonHelper.ArrayFromJson<ConfigRaw>

 With '={OtherSheet!A:A}'  it causes configRaw to have 999 elements (all rows).

Thanks for the clarification. I'll have to try that! Have not seen behaviours like that before, but neither used that forumla, so I'll try and get back to you.

So what are the exact differences between the Lite version and this one?
And how can I buy this version through the Asset Store?
My company has a debit card connected with the Asset Store and when I need to buy something outside of it, it gets complicated :)

(2 edits)

Hello Mat, thanks for contacting.

The Lite version focus is on Google Spreadsheets, while the main version has some extended capabilities to handle Google Drive files and images. Also there is a proof of concept custom session handling system.

Im afraid the main version of the asset is not on the Unity Asset Store. Let me know if I can help in any other way :)

I have a couple scene, after I used

        foreach (GameObject o in Object.FindObjectsOfType<GameObject>())
        {
            Destroy(o);
        }

then, I reload the scene.

MissingReferenceException: The object of type 'DriveConnection' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.

turn out is the follow code

StartCoroutine(CoExecuteRequest(www, postData));


How can I properly stop the connect and start over?

(1 edit)

I really dont understand exacctly what you mean, or what you need. The code is all in the asset so you can do whatever you need.

The handling of scene transitions varies hugely from project to project, so I cant provide a reasonable solution that would cover every case. In that regard, making the connections handling working correctly according to your own approach, is entirely up to you.

(3 edits) (+2)

I got the same problem as the OP. The problem is that "driveConnectorRuntime" gets lost with a level reload, but "_connectionData" does not (pesky static variables! ;), so driveConnectorRuntime will be null if you use e.g. Drive.GetAllTables() on Start() again, and that throws an error. Can you please make an update so it checks if driveConnectorRuntime is null or not?

(My hack right now is to make _connectionData public and setting it to null by hand in an OnDestroy().)

(+1)

Hey there, thanks for the elaboration!

I will annotate this for the next update update indeed, and although I have not ETA atm, I definitively have a list of things to work on. 

Cheers!

I would love to buy this asset, but it is not working for me.

I tried with different sheet ids and it doesn't work.

Do you happen to have an example sheet id?

Hey there. I just tested and is working as expected. You can double check that you are pasting a valid spreadsheet id, and that the spreadsheet has public permissions (only needed for this public demo).

Hi Novack

Now I got one step further:
1.I had to create my public  sheet and copy out the ID
2.Paste the ID and only then I could push the button "Create Table/Worksheet"
3.Then it created a new tab and from this tab I could then read and write.

So it seems to work this way, but had to find out the order of actions myself. Maybe a video would help how to use this stuff the first time.  Anyway I will buy it and try to use it.

Zsolt

The order of actions is the natural. How could it work with a spreadhseet without knowing which one?

But more importantly, its explicitly expained in the demo itself, just above the input where you paste the spreadsheet id.

Why i can't see the sheets on GDrive? I can create and edit tables but I can't find them.

Hello. I dont understand your question, can you elaborate? You can also contact me by email.

Hi, where i can find your email?

In the developer guide PDF you will find the support email, along other useful data ;)

(+2)

Thanks for the great plugin. How to track Drive upload/download progress?  I can't find any www.uploadProgress or www.uploadedBytes handlers

(1 edit)

There is none at the moment! I will add upload progress tracking on next update, thanks a lot for bringing this up.

Download progress handling can be more trickier given that Google uses chunked encoding on responses, and thus, there is no Content-Length header which is required by Unity API to monitor progress.

I will work on it for the next update, which will be after finishing my current project, a simple but effective chat extension for Unity.

(+1)

Thanks for letting us know. Will also keep an eye out for your chat extension - perfect for my next project!

(+1)

+1.

Especially for download progress.

(+1)

Will there be updates when buying from this site?

(2 edits)

Hello there, thanks for contacting.

Absolutely! I will be posting updates and patch releases here as they are developed. Also will do my best to announce them!