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

[RELEASED] Google Sheets For Unity

Discussion in 'Assets and Asset Store' started by Novack, Jan 19, 2019.

  1. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hey @darren8ailey thanks for contacting.

    Indeed, Google Sheets For Unity works on WebGL and Mobile builds :)
    You can check the full information on the asset page.
     
  2. Roman-Ilyin

    Roman-Ilyin

    Joined:
    Oct 9, 2013
    Posts:
    29
    Hello. Does it support Unity 2020.1.* (.NET4)?
     
  3. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello @Roman-Ilyin thanks for contacting.

    Yes indeed. It uses mostly the Unity API so no changes on that front.

    Hope it helps!
     
  4. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Hi Novack,

    I just bought and installed your asset (main edition), it seems great !

    I would like to do something as follows on an Android device :
    How complicated is it to achieve this with your asset ?

    It would be a great help for PlayMaker users (like me) if you could write some PlayMaker scripts...

    Best regards, Phil
     
  5. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello @Philkrom thank you for moving your question to this thread.

    Defining how complicated could result for anyone to do what you describe is highly subjective. But asuming Im talking to an experienced programmer, that can follow the API reference, I would say it should be straightforward: once you have the audio data, you can create a binary file on Drive, and retrieve it later on request. Writing data to an spreadsheet is the fundamental feature of GSFU, so should more or less be solved in a reasonable short time.

    However! Google Sheets for Unity does not support streaming. You'll need to download the file in order to play it.

    As usual, I suggest to start by importing GSFU into an empty Unity project and play around with the examples, until you feel confident enough to work on your own implementation, or tweak the examples.

    On a final note, I have received some requests to integrate the asset with Playmaker, but have not found the time to do it. I have that on the backlog!

    Hope it helps.
     
  6. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Thanks for the infos. This should not be complicated, my concern is that c# is not my cup of tea, so I think I will look for another solution... Waiting for Playmaker actions !
     
    Novack likes this.
  7. MeteorStudio

    MeteorStudio

    Joined:
    Nov 11, 2017
    Posts:
    3
    Hi, I purchased this tool, but I'm having issues using this with WebGL due to CORS.

    The browser's console reports that "Access to XMLHttpRequest at [script.google.com url] from origin [site hosting the WebGL] has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

    It seems that even the demo runs into this same problem. Is there a solution to this?
     
  8. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello @MeteorStudio thanks for contacting.

    You should not get cors issues. Im not getting to reproduce your issues either, just tried the online demo at the asset page, and works as expected.

    What browser are you using? Have heard of some issues with Firefox Nightly builds, but could never confirm any.
     
  9. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello @megatron0, just noted that your post is related to the Lite version of google Sheets For Unity, so the right place to ask questions and post answers is this thread.

    I will move my answer there.
     
    Last edited: Sep 28, 2020
  10. Guilja

    Guilja

    Joined:
    Apr 15, 2020
    Posts:
    3
    Hi,
    I have a question : is it possible to make a request as Drive.GetObjectsByField with a test ?
    Like
    Drive.GetObjectsByField("objects", "Val", ">12", true);
    Thank you :)
     
  11. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello @Guilja thanks for contacting.

    That is a good idea, but regreatably, not possible with GSFU currently. I have been considering reworking the queries API, to enconpass a few requests. I will have this case in mind, but have not an ETA at the moment.

    Thanks!
     
  12. viktorkadza

    viktorkadza

    Joined:
    Sep 4, 2018
    Posts:
    46
    Hi, tried the webgl demo, with sheets id and got errors. Sheet is public,to anyone with the link option.
     
  13. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hey @viktorkadza thanks for contacting.

    There is an error in the overlay used to enable copy paste from Windows to the WebGL player, you can ignore it. If that is not the error you mean, please let me know exactly what errors are you seeing.
     
  14. Guilja

    Guilja

    Joined:
    Apr 15, 2020
    Posts:
    3
    I don't know how much it is a complicated work to add this feature :D.
    I feel you see how much this feature could be usefull and bring new use cases :cool:.
    Thank you @Novack !


    Just to know, when you choose to develop this kind of feature how long it takes for you to develop, test and publish ?
     
  15. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hey @Guilja, the implementation time for this feature should not be too long, however its one more of a rather sizable list of incoming stuff. Also sadly, I cant give an ETA for the moment... too much daywork :)
     
  16. Guilja

    Guilja

    Joined:
    Apr 15, 2020
    Posts:
    3
    I'm looking forwards to your updates ;)

    Bon courage ! :)
     
    Novack likes this.
  17. BingrunJ

    BingrunJ

    Joined:
    Dec 9, 2016
    Posts:
    4
    Hi, I got a problem when trying to upload the localization table. The download table feature works great, but when I press upload, it returns "Undefined server response:" and did nothing with my spread sheet.


    Code (CSharp):
    1. Undefined server response:
    2. <!DOCTYPE html><html><head><link rel="shortcut icon" href="//ssl.gstatic.com/docs/script/images/favicon.ico"><title>Fehler</title><style type="text/css" nonce="ufpAlrZoMUx60VHZANB/lQ">body {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;}</style></head><body style="margin:20px"><div><img alt="Google Apps Script" src="//ssl.gstatic.com/docs/script/images/logo.png"></div><div style="text-align:center;font-family:monospace;margin:50px auto 0;max-width:600px">Exception: Der an appendRow() übergebene &quot;rowContents&quot;-Wert darf nicht leer sein. (Zeile 337, Datei &quot;Code&quot;)</div></body></html>
    3. UnityEngine.Debug:Log (object)
    4. GoogleSheetsForUnity.Drive:UpdateStatus (string[]) (at Assets/Google Sheets For Unity/Scripts/Drive.cs:428)
    5. GoogleSheetsForUnity.Drive:HandleError (string,single) (at Assets/Google Sheets For Unity/Scripts/Drive.cs:416)
    6. GoogleSheetsForUnity.Drive:ProcessResponse (string,single) (at Assets/Google Sheets For Unity/Scripts/Drive.cs:394)
    7. GoogleSheetsForUnity.DriveConnectionEditor:EditorUpdate () (at Assets/Google Sheets For Unity/Scripts/DriveConnectionEditor.cs:43)
    8. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
     
  18. Mojo-Game-Studio

    Mojo-Game-Studio

    Joined:
    Sep 18, 2015
    Posts:
    111
    I have a Dictionary<string,int> how would I pass that to Drive.CreateObjects? Can it be done or do I need to create an array from it first
     
  19. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello @BingrunJ thanks for contacting, and apologies for the delay.

    Good catch. It seems the issue is related to the json output the example is producing. We need some background: There is a JsonHelper class included in the asset, that makes possible for Unity's JsonUtility to output arrays. The json produced needs a fix before being able to be actually consumed by other APIs.

    So you have two options:
    • You use a different json parser able to handle things properly, and get rid of Unity JsonUtility.
    • You change the following code, to patch the helper:

    Please find the ToJson method of the JsonHelper class (at the bottom of the Drive.cs file), and change it to this:
    Code (CSharp):
    1. public static string ToJson<T>(T[] array)
    2. {
    3.     Wrapper<T> wrapper = new Wrapper<T>();
    4.     wrapper.array = array;
    5.     string jsonData = JsonUtility.ToJson(wrapper);
    6.     jsonData = jsonData.Replace("{\"array\":", "").TrimEnd('}');
    7.     return jsonData;
    8. }
    That will produce json usable by the asset, and should fix your issue.

    Again, thanks for the report, and hope it helps!
     
    Last edited: Mar 23, 2021
  20. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hi @Mojo-Game-Studio,

    In order to use the existing api, you need to pass to it the structures it expects. In this case, CreateObjects receives the json produced by the parsing of an array of objects.

    Im not sure whats your case, what objects you need to create, or what the dictionary is expected to represent in table format, but follow the examples and the online API guide to check whats the available option more close to you case.

    Also, have an eye on the fix from the post above, regarding the use of Drive.CreateObjects().
     
  21. Mojo-Game-Studio

    Mojo-Game-Studio

    Joined:
    Sep 18, 2015
    Posts:
    111
    Yep that'll fix it, I didn't read the original post from BigrunJ but it's essentially the same problem I was having. After converting my dict to an array of structs
     
    AlejMC and Novack like this.
  22. BingrunJ

    BingrunJ

    Joined:
    Dec 9, 2016
    Posts:
    4

    It works now, thank you very much! Awesome tool!
     
    Novack likes this.
  23. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Thank you for letting me know folks :)
     
    AlejMC likes this.
  24. AlejMC

    AlejMC

    Joined:
    Oct 15, 2013
    Posts:
    149
    Hello! Wanted to mention first that the asset is amazing and have been using it for the past couple of hours. The entry barrier for these types of network related calls is lowered considerably.

    With that out of the way, wanted to mention that I'm having issues with the examples and I think it will be happening down the line. It's related to public static fields on the classes (like Drive, DriveConnection, DriveConnectionEditor) aren't quite in the right state when hitting play with fast play modes (under preferences - editor - Enter Play Mode settings).
    I have tried to patch it up with a singleton instead of searching for it when setting up the connectionData but maybe there's a better cleaner way for it, especially since you know how the code goes.

    To repo:
    - Select 'enter play mode settings' under Preferences/Editor/ section.
    - Uncheck both Reload Scene and Reload domain inside
    - Load the Spreadsheet example
    - Try to retrieve 'all tables', first time if it is all fresh it might succeed
    - Stop the run
    - Hit play again (it usually restarts almost instantly because it's in fast play mode)
    - Try to retrieve the tables -> at this step it will fail.

    The reason is that while connectionData was set on the previous run, hitting play again leaves the driveConnectionRuntime fields pointing to a destroy object.

    Hope it makes sense and that it's reproducible.

    There's also the chance that I might be doing something very wrong.

    On that note, loving it so far nevertheless... it is considerably more than just retrieving or manipulating tables.

    UPDATE #1: Wanted to say that just adding this check takes care at least on the runtime version side of things
    Screen Shot 2021-03-28 at 12.03.29 AM.png
    (sorry for the editing spam, don't know what was up with the attachment functionality of it, wasn't getting rid of a 'broken' link and an attachment)
     
    Last edited: Mar 28, 2021
  25. AlejMC

    AlejMC

    Joined:
    Oct 15, 2013
    Posts:
    149
    If you don't mind me chiming here again, to add a possible request here, alluded in a previous comment:
    • the ability to get a whole table as rows/columns (maybe csv style format? an string[ , ] ?)
    I'm trying to use it as a 'patterns' editor, so I'm just marking cells with a letter. And a main table contains the high level info and where to look for said patterns.
    Maybe a couple of images can help visualize the idea:
    "Patterns" (main tab) contains the information of where and how to fetch the patterns, JSON will (should) work all good:
    Screen Shot 2021-03-28 at 11.04.47 PM.png

    "Pattern1" is referenced in one field of the main patterns, retrieve all rows and columns using defined in that range. The letter 'c' is just used to store which object is in that pattern (c stands for Coin in this case).

    patterns1.png

    The issue with getting the "Pattern1" table as-is is that it throws off the JSON formatter and gives the best it can, would love to just read it as a string[,] maybe.

    Any pointers or ideas? I could totally launch a series of getcell values requests and reconstruct it, however not too sure that it's a good idea nor it will come in order I guess? Maybe I'll need to 'index' it with a dictionary or something with "{row:col}" as an id.

    Could also even get fancier and use straight images, paint them as pixel art patterns, would be a great small enough toy project, putting the file id of the image on the pattern slot too.

    In any case, great asset, been having a lot of fun with it.
    Cheers.
     
  26. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello @Alejandro-Martinez-Chacin thanks for contacting and apologies! I have been trying to check on your questions but have been a tough couple of days. Will try check this later today when Im available on my computer.
     
    AlejMC likes this.
  27. AlejMC

    AlejMC

    Joined:
    Oct 15, 2013
    Posts:
    149
    Hey man! Absolutely no big deal.
    Just wanted to say that what I did was actually to have a separate UnityWebRequest call with the proper ‘URL’ format to the pattern’s sheet page, there’s a way to just get a raw csv string output returned by having the sprite sheet id (retrieved via the normal Drive API call to json object you provide) and output option, something along the lines of ‘spritesheetid?output=csv” or something like that. When I get myself on the PC will complete this brief post for others to see in case it’s useful.

    With that said, hope things get better on your side.
    Thanks!

    EDIT: an example of the code of how I'm getting the 'raw' spreadsheet. One caveat to take into account is that the output depends on what you have on the sheet, so having one single element on the first cell and another value on a very far away cell it will give the whole range of empty values in-between (kinda expected).

    Code (CSharp):
    1.  
    2. IEnumerator HttpGetSheetAsCsv(string sheet, Action<string> onCsvReceived = null)
    3. {
    4.     var url = $"https://docs.google.com/spreadsheets/d/{Drive.driveConnectorRuntime.connectionData.spreadsheetId}/gviz/tq?tqx=out:csv&sheet={sheet}";
    5.     var www = UnityWebRequest.Get(url);
    6.     yield return www.SendWebRequest();
    7.  
    8.     while(!www.isDone)
    9.         yield return null;
    10.  
    11.     switch (www.result)
    12.     {
    13.         case UnityWebRequest.Result.InProgress: // Can't get here if it is blocked above while !isDone.
    14.             break;
    15.         case UnityWebRequest.Result.Success:
    16.             var csv = www.downloadHandler.text;
    17.             onCsvReceived?.Invoke(csv);
    18.             break;
    19.         case UnityWebRequest.Result.ConnectionError:
    20.         case UnityWebRequest.Result.ProtocolError:
    21.         case UnityWebRequest.Result.DataProcessingError:
    22.             Debug.LogError($"Web Request Error of type: {www.result.ToString()}\nError message: {www.error}", this.gameObject);
    23.             break;
    24.         default:
    25.             throw new ArgumentOutOfRangeException();
    26.     }
    27. }
    28.  
    29. void SplitCsv(string csv)
    30. {
    31.     // Boolean on the monobehaviour for dumping if needed.
    32.     if (dumpCsv)
    33.         Debug.Log(csv);
    34.  
    35.     // Clear the "string quotes" out of the strings.
    36.     csv = csv.Replace("\"", string.Empty);
    37.     // convert text into rows by splitting along line breaks
    38.     string[] rows = csv.Split("\n"[0]);
    39.     var rowsLength = Math.Min(rows.Length, p.Rows); // Rows could be 'clamped' by the pattern source cloud data.
    40.    
    41.     // Wasteful but heck, sacrifice the first row to see the amount of columns (assuming all rows have the same amount of column fed)
    42.     var columnsLength = Math.Min(rows.First()
    43.         .Split(',').Length, p.Columns); // columns could be 'clamped' by the pattern source cloud data.
    44. }
    45.  
    46. void SampleUsage()
    47. {
    48.     var sheet = "googleSheetName";
    49.     StartCoroutine(HttpGetSheetAsCsv(sheet, SplitCsv)); // Or your own lambda instead of SplitCsv.    
    50. }
    51.  
    52.  
     
    Last edited: Apr 17, 2021
    Novack likes this.
  28. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    402
    Hey, it seems the google scripts api website has changed and this screenshot is no longer valid. Can you update the pdf?
    2021.05.13 09_57_40-Google Sheets For Unity Developer Guide - Google Docs.png
     
  29. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    402
    More:

    It seems uploading objects to a google sheet is now considered a restricted action and I don't know how to get authorized to do this :(
     
  30. AlejMC

    AlejMC

    Joined:
    Oct 15, 2013
    Posts:
    149
    For this one there was a way to display the 'legacy' editor.
    See if you can find it, I just hope that it didn't go the way it usually goes with Google where they offer the option to go back to the original feature until that option is gone and we are left with the 'new shiny revamped' thing that happens to have less features, less options, less functionality, less everything.
     
  31. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    402
    Yes, but its no longer possible to publish a script accessible anonymously that writes to a google sheet :(
     
  32. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    402
  33. sukebei

    sukebei

    Joined:
    Sep 16, 2019
    Posts:
    1
    Hey Novack

    Ran into a problem (sort of?) that you might want to look into.

    Implemented GSFU, tested it in the Unity Editor, works great. Build the game to WebGL and hosted it via github.io. Here's the weird problem:
    Using Firefox to play the WebGL version, GSFU does not talk to the spreadsheet. It won't save data to it or retrieve it. However running the WebGL on Edge, everything works fine. Haven't tested it on other browsers (Chrome, Opera, Safari, etc).

    Obviously GSFU is working, but something in Firefox is blocking it. Not specifically your problem, more of Mozilla's problem, but thought you might want to be aware or have and idea of what the cause is.
     
  34. RAW_MUSASHI

    RAW_MUSASHI

    Joined:
    Jul 18, 2018
    Posts:
    1
    Hi, I've purchased the itch.io version and tried the google sheets. I've set up the webservice, but can't seem to edit the spreadsheet I've set to public and added permissions to read & write. I followed how to get the id from the link, but still in unity editor I receive a log "Worksheet table was not found." and on itch.io demo I get Unknown error.

    Can we get into contact to deal with this issue, I seem to be doing something wrong. Thanks.


     
  35. LaDigitalRose

    LaDigitalRose

    Joined:
    Nov 20, 2020
    Posts:
    2
    Hello, I also am running into errors with the Google Sheets version. It seems to always say "Incorrect Credentials" even though I've made the sheet public to anyone with the link. Should I be putting something in the "Service Password", "Session User" or "Session Password" fields of the scriptable Object in Unity? Where are these fields coming from?
     
  36. Novack

    Novack

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

    @Alejandro-Martinez-Chacin, @Xelnath, @sukebei, @RAW_MUSASHI I will check your posts and get back to you as soon as I can. Thanks again for the patience.
     
    AlejMC likes this.
  37. amoraleite

    amoraleite

    Joined:
    Oct 16, 2014
    Posts:
    41
    Hi Novock!
    It's possible to send a data to google sheet and later overwrite this data using a type of id?
    Other words: I have to send data for the some position on the sheets, but without generate another line on the sheets.

    Thank you very much!
     
  38. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    @amoraleite Thanks for contacting.

    Yes it is possible by design. You can send objects with arbitrary fields, and then retrieve, update or delete objects using any of the fields as lookup.
     
    Last edited: Aug 10, 2021
    amoraleite likes this.
  39. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    @Alejandro-Martinez-Chacin regarding your first issue, the error on the Unity Editor when not using domain reloading on Play. You can quickly solve that with a hack (I dont think its worth doing more than that because its not something that we will be able to repro on any other production scenarios!).

    At the very top of the static method SetConnectionData(bool runtime), add the following code:
    Code (CSharp):
    1. #if UNITY_EDITOR
    2.             _connectionData = null;
    3. #endif
    That will force to reassign some stuff every time, and will solve the issues with hot reloading.
     
    Last edited: Aug 14, 2021
    AlejMC likes this.
  40. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    @Alejandro-Martinez-Chacin, regarding your other posts on the pattern scheme.

    I understand the scenario, though it is a highly custom requirement as to consider it as a feature request.

    That being said (and regardless of the fact that you have already solved it) I'd like to comment on the options you have:

    On one side, indeed you have the option to bypass Google Sheets For Unity as you did, and retrieve the required data using the sheet id, in a raw format of choice. That has some upsides, as better performance, but has also some manual work on parsing the data.

    On the other, you could also use the GSFU exisiting getTable request, and manually parse the data from the resulting array into an string[,] as you need.

    And last but not least, you could also work on the DriveForUnitySocket server side script, to create a new request type, and pass the parameters that you fetch from "Patterns", to retrive the data you need, and return it on the format you require, ie: as string[,].

    Hope it helps, and thank you for your great feedback and kind patience!

    PS: thanks for sharing your solution btw :)
     
    Last edited: Aug 14, 2021
    AlejMC likes this.
  41. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    @Xelnath Thanks again for contacting, and sorry for the long delay in coming back to you.

    That is indeed a missing feature of the new Google editor. As has been already commented you can momentarily get back to the legacy editor in order to set the property.

    I also have added new code to the bottom of the DriveForUnitySocket script, two convenient methods to overcome the situation until Google fixes the new lacking editor:

    Code (CSharp):
    1. function GetScriptProperties()
    2. {
    3.   var properties = PropertiesService.getScriptProperties().getProperties();
    4.   Logger.log(properties)
    5. }
    6.  
    7. function SetScriptProperties()
    8. {
    9.   var key = "PASSWORD";
    10.   var value = "passcode";    // Change this value to your own passcode.
    11.   PropertiesService.getScriptProperties().setProperty(key, value);
    12.  
    13.   GetScriptProperties();
    14. }
    You can retrieve a new copy of the script as usual, or you can simply copy and paste this code on your own. No need to redeploy, as this is code that will only work for the dev:
    1. If you pasted the code yourself, first thing hit save button (or CRTL+S).
    2. Then go to the method selection drop down at the toolbar, and select SetScriptProperties.
    3. In the SetScriptProperties() method go the "value" variable and write your own passcode.
    4. Click "Run" on the toolbar.
    upload_2021-8-10_17-8-3.png

    That should set the property!
     
    Last edited: Aug 10, 2021
    LaurieAnnis likes this.
  42. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    @Xelnath regarding your second post (and and I presume third) post:

    That is luckily not the case :)
    Im not sure what is the issue you have found, but I was able to deploy anonymous scripts using spreadsheets without any issues.

    Let me know if you have solved your issues with it.
    Hope it helps!
     
    LaurieAnnis likes this.
  43. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    @sukebei Thanks a ton for the report, and sorry for the delay on getting back with a comment.

    I've had that sort of thing some time ago, but was never consistent.

    I just tested Firefox 90.0.2 and worked as expected, do you know if its still happening for you on your current version of Firefox?

    Just in case, I reuploaded the demo, I had to do it anyway to fix a longstanding bug when pasting text into an input.
     
  44. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    @RAW_MUSASHI Hello there, thanks for ccontacting and apologies for the delay in getting back to you.

    Are you still getting the mentioned issues? It is not necessary for GSFU to work, to make a spreadsheet public (except fot the demo, for obvious reasons). Have you checked the Developer Guide?

    The issues with the online demo should be fixed, I have updated the webgl deployment (also I had inadvertently removed the server side deployment, which is also back online), so everything should be fine as far as the itch.io demo.

    Hope it helps!
     
  45. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    @LaDigitalRose thanks for contacting, and apologies for the delay.

    It is not clear to me if you issues are with the WebGL demo, or with the asset on Unity.

    Remember that its not necessary for GSFU to work, to make a spreadsheet public (except fot the demo, for obvious reasons).

    Speaking of which, I have solved some issues with the online demo: have updated the webgl deployment (also inadvertently removed the server side deployment, which is also back online), so everything should be fine as far as the itch.io demo. If that was your issue, please check again.

    If you was experiencing issues with the asset itself, please do let me know, but make sure to first read the included Developer Guide, that will explain how to setup and use the asset.

    Thanks again for your patience!
     
  46. AlejMC

    AlejMC

    Joined:
    Oct 15, 2013
    Posts:
    149
    Just wanted to say thanks a lot for getting back to us with an array of fixes and suggestions to boot.
    Will try the ‘getTable’ api and parse it at some point too, to explorer that option.

    Thanks once again.
     
    Novack likes this.
  47. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    You're very kind! Thank you :)
     
  48. Gr33nIguana

    Gr33nIguana

    Joined:
    Feb 24, 2011
    Posts:
    14
    @Novack first of all thank you for this wonderful plugin. It works straight out of the box. So far I have just been meddling around in the demo scenes.
    I do have a question, when using the spreadsheet demo I can create new rows starting from the top and afterwards I can update some info in the collums. But when I start creating rows again, it will start again from the top. Is it possible to select a row as a startingpoint, so then from there I want to create new rows below it?
     
  49. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hello @Gr33nIguana thanks for contacting, and thank you for the kind words! :)

    Regarding your question: Google Sheets For Unity will always add new objects (rows) at the bottom of the table. So what you describe is either a bug, or a misread (happens very often working with data tables with duplicated data).

    As per what you describe, you create the table, add elements, update some, create elements again, and those would be added at the top. Thats correct? I cant get that to happen, even on the public demo. Can you elaborate a bit more?
     
  50. Gr33nIguana

    Gr33nIguana

    Joined:
    Feb 24, 2011
    Posts:
    14
    Screenshot.png
    I am recording times from loading tests, each test has 2 versions, and each version has 2 recorded times.
    Version A (time 1 = _dl1 / time 2 = _dl2 / average = _dlT) (Yellow part)
    Version B (time 1 = _as1 / time 2 = _as2 / average = _asT) (Green Part)

    So I start with creating a user (worksheet) and some field names for the used columns, as seen in the red part (nr1).
    Then I run version A of the test (for example Tech_Non) for a couple of times and record the times, this happens in the yellow part (nr 2), to save the data I make use of
    Drive.CreateObject(jsonPlayer, _tableName, true);

    Then for version B of the test, instead of creating new rows, I update the Tech_Non rows and add the green part (nr 3).
    Then I create a special row with the averages calculated in the blue part (nr 4).
    So far everything (seems) to be working correct, but then..

    A new test starts, version A of Tech_1, I record the times in the orange part (nr 5)
    And then my system breaks, when I want to run version B and create the purple part(nr 6), it starts to overwrite the rows
    of Tech_Non in the yellow part again.
    I see were it goes wrong, it is because I update by checking the column testNumber 2, and these have of course the same values as the previous tests.

    Currently I use
    Drive.UpdateObjects(_tableName, "test_2_Nr", testnumber, jsonPlayer, false, true);

    to update the existing rows to add the information from version B.

    But instead of _tablename (which is the user) I want to search / save by row name (for example "Tech_1")
    So I can search for (Tech_1, test_2_Nr, value)