[RELEASED] Google Sheets For Unity Lite

Google Sheets For Unity Lite, enables the developer to send and fetch game data from Google Drive Spreadsheets at runtime, through a RESTful API.

With more than 5 years on the store, an asset which is the result and product 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.

[GET IT HERE]

This opens a world of posibilities for collaboratively design, development, balancing, localization, etc.

By simplifying the process of creating, storing, handling, distributing, tweaking and importing data -among localized or distributed teams-, saving or fetching values from Google Sheets at runtime or design time, makes heavy duty tasks straightforward and pain-free.

Check the public API reference.
Check out the demo!

Summary:

• Send and receive data from google spreadsheets at runtime or design time.
• Works with all plataforms, Desktop, Mobile and WebGL builds.
• Customize your workflow with flexible and solid Google solutions for distributed work.
• No Google account credentials required on the Unity side.
• Source code included.
• Lightweight package: ~600Kb.
• No Google API dependencies to maintain.
• Works with privately shared Google spreadsheets.
• Works with spreadsheets from the end-users provided they are public or shared with the developers account.
• Simple examples included of in-game & in-editor uses.

What is the difference with the main version?

The original version has been rebranded “Lite” edition, to denote the difference with the new asset .

The new version 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”). Makes available features for Google Drive files and folder management, images, a mimic for stateful sessions, among other thingies.

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

Changelog:

1.2.0
• Now the options for communicating with the Google Spreadsheets are:

  • At runtime from the game itself.
  • At design time, from the editor menu.
  • At runtime, from the editor menu.

All three options affect the scene, but the editor menu affects hierarchy assets (materials in the example case), so the changes can be persisted by simply saving the project.

1.5.0
• GSFU is a Unity5-ready extension!

2.0.0
• Completely refactored.
• Moved to the new UnityWebRequest api, leaving behind the WWW class.
• Replaced LitJson with the new Unity JsonUtility api.
• Implemented a small, simple and clean API: simple CRUD operations between Unity and Google Spreadsheets is now posible out of the box.
• Complete Developer Guide rewrite.

2.2.1
• Refactor to include in-editor example.
• Password protected access.
• POST / GET Request option.
• Extended developer guide to accomodate new features.
• Server script updated for highly increased performance (released prior to official update).

2.2.2
• Conditional compilation for editor related scripts.
Update (19th January 2019):
• From this date, this version will be branded as the Lite version of the asset. Read here to find about the new full version .

3.0.1
• Codebase updated to match the full version architecture.
• Refactored connection data handling.
• Refactored server responses to return pure json.
• Added API methods for individual cell I/O.
• Added localization example.
• Added Editor Console log example.
• Server script updated for better concurrency handling.
• Added option for batch-creating objects.
• Added option to UpdateObjects() for creating if not found.
• Moved away from singletons for the connections.
• Added prefab for simplicity of use.
• API Reference is public now.

[Public API Reference can be found here]
** [Full Version** can be found here ]

[GET IT HERE]

Hi

I’ve set up the Web service script as per the instructions, and the demo scene is working.

When I try to get data from my own spreadsheet I get this as a response :

2.792249 : Errorbody {background-color: #fff; margin: 0; padding: 0;}.errorMessage {font-family: Arial,sans-serif; font-size: 12pt; font-weight: bold; line-height: 150%; padding-top: 25px;}

TypeError: Cannot call method “getDataRange” of null.
UnityEngine.Debug:Log(Object)
c__Iterator1:MoveNext() (at Assets/GSFU/Scripts/UnityDataConnector.cs:97)

I followed the instructions in the PDF to set up the web service. Any ideas?

Never mind, fixed it. The “security” sheet was called ‘password’ instead of ‘passcode’

Thanks for contacting, glad you solved it! Hope it be useful.

Can you give API examples/workflow?

Hi there. The workflow is based on a call to a webservice. You create a unity WWW connection string based on your requirements from the sheet. So your call will include a spreadsheet id, a worksheet name and a password, and it will return the data on that sheet.

If you want to send data, is almost the same, except that you change some parameters, and include the data you want to send. Then the web service will append a row with the values sent, to the specified spreadsheet.

The webservice script is deployed on your google drive, and is customizable as well (server side javascript), so you can simplify it, or develop a more complex scheme.

The included example is trivial, but denotes the simplicity of use.

Please let me know if this helps, or you wanna know more specific stuff.

If you look at documentation for this, this is an example what data I pull from google into.

http://forum.unity3d.com/threads/205143-Released-GoogleFu

Sorry, Im not sure I follow your comment?

Well, isn’t this nifty…
I’m tempted to buy it just to see what this element looks like…
Good on ya…

How would I use it from my code? You should download GoogleFu free and compare

@casperjeff
Thanks very much man! I faced a variety of options for doing this, and after some rewrites this approach definitively was the one that felt better, with the less burden on the Unity project. You dont need google APIs, nor dealing with authentication, and that really makes the difference on the interaction speed, specially when trying to send or retrieve multiple batches of small amounts of data.

@imtrobin
I think in my comment above I was descriptive enough, if you’re wondering how a WWW call works in Unity look in the docs, is pretty straightforward. Be aware though, this is not something that will necessarily work on your project as-is. The included example showoff the typical implementation, but as with any external code, you will have to tweak it yourself according to your needs. Specially if you want to send data to the spreadsheet, you will almost certainly want to tweak the webservice code to expect the number of fields you want.

hi,
I buy today.
I followed the instructions in the PDF, abd change the sample scene with my own webservice and create the example sheets.
The data in Balls spreadSheet if i change works. But if i rename the “Balls” spreadsheet to anything else don’t work. Also the passcode is not working, works only with passcodehere and not with my password. Statistics spreadsheet also not receive any data.

I’m in a hurry, and really need this working…

Hello emo55. Thanks for using GSFU.

I received your email, but needed a moment before answering :slight_smile:

Sounds like you are changing the spreadsheet, but you’re not changing the values in the gameobject in the unity scene. When you change the example sheet name, you need to also change the corresponding field in the scene “ConnectionExample” gameObject field in the Unity editor. The same goes for the password.

Hi,
My ConectionExample gameobject have the changes…1596453--96033--$Captura de pantalla 2014-04-16 a la(s) 18.38.02.png
corresponding to my spreadsheets names in google drive
1596453--96035--$Captura de pantalla 2014-04-16 a la(s) 18.43.50.png

Im not sure I follow your interpretation of the manual. I think you’re confusing Spreadsheet name with Worksheet name.

What the Unity field expects as “Sheet Name” is the worksheet name, not the spreadsheet name. This is clear in the manual I think.

You seem to have created multiple spreasheets, when in fact is one spreadsheet, with different worksheets (aka “sheets”). Again, this is clear in the example spreadsheet, and in the manual.

Edit: I just received more emails from you, I do speak spanish, lets continue the conversation by email, I think the issue is that some things are getting lost in translation for you :slight_smile:

Thank’s, now works :wink: Las prisas no son un buen aliado :wink:

Glad it worked :slight_smile:

I downloaded both and just reading the documentation there is one very big and key difference:

GoogleFu is for Designer / build time
GSFU is for runtime.

So depending on your needs, …

Hey @crawfis, thanks for using GSFU! :slight_smile:

I’d like to clarify, that GSFU can be used at design time as well. I just did not inluded an example of that, but some users of the extension have walked that road.

Should not be too hard to port the existing functionality to an editor menu, and create a local data file for use on the game later. It would be just a matter of using another loop structure in place of the coroutines.

I will probably add such example implementation to the asset at some point. I just dont have the time at present.

Just out of curiosity:

  1. What is the performance like, when pulling data? Would it scale for large amounts of data?

  2. Are there any security issues (man-in-the-middle or replay attacks) and is there anything in place to combat them? Or is this outside the scope of the projects?

Thanks Alex :slight_smile: