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] G2U 2.1.13 - Use Google Spreadsheets in Unity

Discussion in 'Assets and Asset Store' started by Shane-C, Oct 14, 2013.

  1. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    G2U Asset Store Page

    IMPORTANT UPDATE!


    If you are unable to log in to your Google Account, you MUST update to the latest version of G2U. Google changed the way authentication works, and the older version of G2U (And GoogleFu 1.x) are NOT compatible.

    IF YOU HAVE INSTALLED PRIOR TO 2.1.0

    The default install folder has been changed. This means you MUST remove the previous /Assets/Google2u folder (You may leave your Google2uGen folder in-tact) before you install the newest version. Otherwise you will get a screen full of warnings/errors.

    G2U -

    A fusion of the Unity development tools and Google Spreadsheets. Harness the power of Google Spreadsheets within Unity while developing your game. G2U allows you to import data from Google Spreadsheets with a click of the button, without having to leave the editor. The Editor Extension works as a pre-build step, so your application never has to contact Google itself.

    • Localize Strings
    • Manage Character Stats
    • Manage Items
    • Create Loot Tables


    Assists the import of Microsoft Excel, Open Office, XML, and other popular formats into Google Documents.
    Works with published Google Spreadsheets, as well as private spreadsheets tied directly to your Google account
    Supports generating NGUI Localization files
    Generates custom Playmaker actions tailored to your data
    Source Code included in the full version!
    Public Documentation

    G2U - Full Version
    G2U - Free Version

    FAQ:
    Q) What is the difference between the Full version and the Free version?
    A) The Free version of G2U is limited to exporting 10 Row x 10 Col spreadsheet. It is designed to allow you to use the plugin in it's full capacity, but restrict the amount of data it will process. If you only need a 10x10 spreadsheet, then go nuts, there are no other restrictions. The Free version of G2U is also compiled into a DLL, where the Full version contains all of the raw code files.

    Q) Do I have to use my Google account?
    A) No, you are not required to sign in with a Google account. You can make any of your personal spreadsheets publicly accessible, and G2U will be able to import the data. However if you do allow G2U to authenticate, it will be able to access private spreadsheets tied to your account.

    Q) What does G2U do exactly?
    A) G2U retrieves data from Google Spreadsheets, and formats it in a way that is easy to retrieve in your game. This makes a Data Driven design extremely efficient, and also allows you to very easily localize all of your strings, and retrieve them by using a string ID.

    Q) Does this mean my game must contact Google?
    A) No, G2U does all of the data retrieval outside of your game, and packs it up into files, or stuffs all of the data into a GameObject in your scene. This is all done prior to running the game, so there is no communication with Google at runtime.

    Q) Can I use G2U entirely offline?
    A) No, G2U utilizes the Google Spreadsheets API and requires access to the Google Docs cloud in order to retrieve data. However you absolutely can create your spreadsheets offline using Excel, OpenOffice, or other programs, and G2U will assist in uploading those files to Google Docs when it's time to import them into your game.

    Q) Can I use G2U at runtime?
    A) No, G2U is strictly an Editor Extension and is in no way included with the final build of your game. Google can sometimes be extremely slow, and accessing it at runtime would introduce security issues between your game and your google account. For runtime access of a database I recommend looking into a web hosted SQL server with PHP scripts to access it. It's much faster, secure, and designed for this purpose.

    Q) Can I use G2U to write to a Google Spreadsheet?
    A) No, G2U is a one-way street from Google to Unity. We have explored options for modifying and writing values back to a Google Spreadsheet, but the Google API does not give us any indication whether or not the value in the Google Spreadsheet is a formula or not, and writing back to the spreadsheet will destroy all formulas currently in the cells. Furthermore if a spreadsheet changes in the time between pulling the information from Google and writing it back, there is no way to reconcile which difference is correct, without recreating GIT or SVN like functionality, which is out of scope for this project. Currently, there are no plans to support this feature.

    Q) I have a problem! Who do I contact??
    A) You can leave a comment on this thread, or use the following email. contact@litteratus.net

    Note:

    G2U is incompatible with the WebPlayer build target.

    Here's why:
    The Unity network libraries do not care where the network traffic originates, be it your application or the editor itself. The network libraries restrict Cross Domain Communication when the WebPlayer target is active. This is a conscious decision by the folks at Unity, because cross domain communication introduces a whole host of problems. Unfortunately this is exactly what G2U needs in order to authenticate.

    Workaround:
    Switch to the PC/Mac target when using G2U, and switch back when you're finished. I know this isn't ideal, as it can take a long time to switch platforms in some cases. Unfortunately this is our only alternative for the time being.
     
    Last edited: Feb 15, 2016
  2. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Version History

    2.1.13

    • Official support for Unity 2017
    • Removed support for Unity versions prior to 5.6
    • Option for exporting CSV, JSON, and XML to a single directory instead of making a subfolder per sheet

    2.1.12

    • Re-Added a missing directory in the previous version

    2.1.11

    • Fixed a deprecated code issue in Unity 5.4 or greater

    2.1.10

    • Added a new option for disabling type row support and generating a more concise XML output
    • Added an option for removing the leading underscores from generated variables

    2.1.9

    • Exporting will now trigger an Asset Database refresh

    2.1.8

    • Fixed a critical issue with Object Database
    2.1.7
    • Fixed an issue with void columns causing object database data mismatches
    • Fixed an issue with newlines in strings causing data mismatches
    • Fixed the sample scene and added a new tutorial
    There were a few files that have changed locations. It's recommended that you remove the previous install completely before upgrading

    2.1.6
    • Fixed issues with data loss in Object Databases.
    • Fixed a bug were export directories would generate regardless of output type.

    2.1.5
    • Fixed more Void Column issues
    2.1.4
    • Fixed Void columns in Object Databases sometimes causing unexpected results
    • Fixed empty cells in Type columns no longer throw exceptions

    2.1.3
    • Fixed warnings in Editor Window code
    • Fixed Verification when skipping columns
    • Fixed stopping on blank columns when there is no type row
    • Fixed JSON Class generation when skipping blank columns
    • Moved documentation assets and images to a folder so they will not be included in the final build
    • Fixed warnings in sample code

    2.1.2

    • Static DB Auto-Path Generation fixed
    2.1.1
    • XML exporting has been fixed
    • Added a confirmation dialog when switching between Row 2 and Type Row

    2.1.0

    IMPORTANT NOTICE

    The default install folder has been changed. This means you MUST remove the previous /Assets/Google2u folder (You may leave your Google2uGen folder in-tact) before you install the newest version. Otherwise you will get a screen full of warnings/errors.

    • G2U now lives in the Standard Assets folder. This means it will not need to recompile along with the rest of your code. This is a huge time-saver!
    • All Using directives have been moved inside of the Google2u namespace to help prevent accidental library collisions.
    • Newtonsoft.Json.net has been removed, and the GDATA libraries that required it have been modified. G2U is now fully compatible with the other JSON.Net libraries
    • JSON Validation no longer requires the ID column to be valid... but it still MUST exist in your spreadsheet! There is now an option to suppress it from the export entirely
    • Path issues and other misc bugs have been resolved

    2.0.10

    • NGUI Legacy Support returns to G2U (For those of you sticking with NGUI <3.5.0)
    • Object Database Export now supports setting a GameObject per-sheet
    2.0.9
    • Fixed a null object when starting a new project

    2.0.8

    • G2U will now save preferences properly in all cases
    • Byte arrays are once again properly supported
    • Vector2 will once again validate properly
    • CSV export will automatically enclose strings with commas, quotes, and newlines with quotes
    • Rows will not attempt to validate past blank rows if "Stop on Blank Row" is checked
    • Sheets will automatically be re-validated when changing options

    2.0.7
    • OAuth2 token retention improved
    • Added the ability to hide Account Workbooks from the view
    • Preferences are now saved to a file that can be transferred to other computers
    2.0.6
    • Fixed Manual Workbook access bug

    2.0.5
    • Replaced the Newtonsoft.Json.net.dll with one built against .NET 3.5 to comply with the Unity Editor's mono compatibility.
    • Removed the legacy GoogleFu 1.0.15 project (Rest In Peace)

    2.0.4
    • Fixed Authentication Issues with Google
    • G2U no longer stores any kind of personal information, as it is all handled via OAuth2
    • Fixed the ID column missing from JSON exports
    • Fixed issues with JSON and Unity classes / complex data types, and arrays
    • G2U is once again dependent on Newtonsoft.Json.Net

    2.0.3
    • Fixed issue with Playmaker export path.
    • Fixed void rows not validating properly in some cases.

    2.0.2
    • Fixed Playmaker export issues
    • Added Legacy support for old GoogleFu projects that had column names forced to lower case
    • Fixed a CSV export issue with line breaks
    • Added missing export options for NGUI export 2.0.1
    • Recompiled and Submitted with Unity 5
    • G2U is BACKWARDS COMPATIBLE with Unity 4.5.5+

    2.0.0
    • Rebranded to G2U
    • Major UI Overhaul
    • Multithreading Support
    • View / Edit / Update spreadsheets from within Unity

    1.0.15
    • Updated to be Unity 5 compatible
    1.0.14
    • Fixed an issue where workbooks were not refreshing when using multiple Google accounts

    1.0.13
    • Fixed JSON output bugs
    • Fixed Playmaker code generation when using void/ignore rows and columns
    • Improved authentication and workbook regeneration speed. (Use Auto-Login.. it's faster!)

    1.0.12

    • Added feature to ignore marked columns and rows
    • Fixed missing strings in the editor
    • Fixed a bug with submitting non-excel documents when uploading to Google
    • Improved auto-generation of output directories
    • Fixed a bug with CSV exporting
    • Added an option to surround strings with quotes in CSV export. Off by default.

    1.0.11a
    • Fixed issues with zero length arrays
    • Fixed the lockout issue with Android and iOS build targets

    1.0.10

    Generated Code:
    • Added a property for the number of columns in a Row ( Row.Length )
    • Added the ability to get the string value of a Row using the bracket operators

    Arrays:
    • Added support for data arrays in individual cells

    GUI:
    • Added the ability to choose delimiters for single cell arrays
    • Added an option to trim whitespace on strings
    • Added an option to trim whitespace on string arrays

    Export:
    • Added the option for CSV export directly

    Compatibility:
    • Restricted GoogleFu from operating under invalid build targets
    • Updated Manual Workbook support to work with the new URL generated when you publish to the web
    • Removed support for char, short and double value types

    Bug Fixes:
    • When generating an object database, if an error is detected the generation will stop immediately and report an error
    • Quaternions are now displaying correctly in the Editor
    • Improved some error conditions and debug output

    1.0.9

    • Compatible with NGUI 3.5.0 and greater
    NGUI <3.5.0 still supported through the use of a Legacy checkbox

    1.0.8

    • Added more Playmaker actions to assist in retrieving data
    • Added a ToString function to Rows to print out all data within the row

    1.0.7

    • Fixed an authentication issue when shared workbooks are marked as private/read only

    1.0.6d
    • Fixed an issue with Color not being properly generated in the custom editor script

    1.0.6c
    • Removed all using directives to maximize compatibility

    1.0.6a
    • Fixed a bug in the Database Object creation
    • Fixed index out of range exceptions with static databases

    1.0.6
    • Fixed an issue with bools in the spreadsheet. They are now properly supported
    • Changed a backslash to forward slash when exporting NGUI Localization, Mac compatibility
    • Added an option to JSON exporting to choose between automatically escaping Unicode characters or not

    1.0.5
    • Moved DLL’s into the Editor directory to prevent them from being included in final builds*
    • Added support for Diakon Forge localization file export

    *If you have previously installed GoogleFu, updating this package will NOT remove the old DLL’s from the project. You must manually remove all DLL’s contained in the Assets/GoogleFu directory, or remove GoogleFu from the project entirely, and re-import. This will not remove any of your saved settings.

    1.0.4
    • Fixed issues regarding Vector2, Vector3, and Quaternion types in the Custom Inspector code generation

    1.0.3
    • Rearranged file structure to remove icons from being included into final builds
    • Removed a Using directive from a file that was causing build issues

    1.0.2
    • Recompiled the NewtonsoftJson.dll. It should play nice with other plugins now

    1.0.1
    • Initial version.
     
    Last edited: Mar 25, 2018
  3. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    For managing monster stats, does it bind directly or do I have to to parse the strings from excel?
     
  4. kyy921

    kyy921

    Joined:
    Aug 6, 2009
    Posts:
    4
    I try to generate database, but it always show "Assets/GoogleFuGen/ObjDB/Resources/SampleCharacters.cs(111,30): error CS1519: Unexpected symbol `string' in class, struct, or interface member declaration" how I can make it right?
     
  5. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    GoogleFu provides all the functionality needed to get the Google Spreadsheet into your game. From there, it is simply a function call to retrieve data. Excel databases can be uploaded to Google from directly within GoogleFu as well.
     
    Last edited: Dec 10, 2013
  6. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    kyy921: I'd love to help, but I will need to see the data you are trying to generate. Please contact me at contact@litteratus.net so we can attempt to clear this up.

    Sorry for the late reply, I didn't get a notification that someone posted to this thread. I will keep a closer eye on it from now on.
     
  7. DigitalGlass

    DigitalGlass

    Joined:
    May 12, 2009
    Posts:
    88
    Hey this sounds pretty awesome. Before I purchase does data serialization work standalone? I'd love to be able to use the same data on my game servers.
     
  8. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    You have a choice as to which type of format you want the data in when you export from Google. There is an option to generate a class that has all of the data created on construction, XML file, a JSON object, or a Unity Game Object that is populated with the data. For Localization there are also options to export in a format digestible by NGUI, and in the next release Daikon Forge (Which is essentially a CSV format).

    Regardless, all of these options are stand-alone. This does NOT communicate with Google at runtime. It is all strictly a pre-build process.
     
  9. DigitalGlass

    DigitalGlass

    Joined:
    May 12, 2009
    Posts:
    88
    Sorry when I say stand-alone I mean that my game servers are not a unity project, it's a c# game server, but it does sound like it'll still work, and if not, having the source code to change it sounds great. I'll give it a go and let you know.
     
  10. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Yep you get full source. Adding a new export option is pretty easy, there are a couple of files you'll want to modify to add in more options. Shoot me an email at contact@litteratus.net if you get stuck and I'll lend a hand!
     
  11. DigitalGlass

    DigitalGlass

    Joined:
    May 12, 2009
    Posts:
    88
    Will do, thanks for the quick response :)
     
  12. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    GoogleFu version 1.0.5 has been approved.

    Fixes: Issue with DLL's being included with the final game build. Moved the DLL's into the Editor directory to keep them from being included.
    Improvements: Support for the Daikon Forge Localization. Essentially a CSV with specific rules for formatting.
     
  13. realblues

    realblues

    Joined:
    Dec 10, 2010
    Posts:
    10
    I need to export data while Running Game.

    Is it possible?
     
  14. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    When importing localizations for NGUI on Mac, it tries to generate a path containing backslash '\' instead of '/'. Guess it is only tested on Windows?
     
  15. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Negative. GoogleFu is an editor extension, and is not designed to access Google at runtime. Google Spreadsheets service is unreliable at times, and slow. It's not something that you want to try to access at runtime anyway. I would suggest using a SQL database with PHP bindings if you are trying to access data at runtime.
     
  16. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    There is only 1 codepath for importing, with no distinction between PC and Mac. Correct, it's tested on a PC, but if this is causing problems on the Mac platform I will certainly patch it! Could you please contact me @ contact@litteratus.net so we can work out the issue?

    Thanks for the bug report! This is super valuable stuff!
     
  17. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    Dear Shane,

    I d like to use GoogleFu but I need to read spreadsheet in offline mode.

    It is possibile?
     
  18. exiguous

    exiguous

    Joined:
    Nov 21, 2010
    Posts:
    1,749
    hey shane,
    i also have a question (own it already) which i have not found in the documentation at a quick glance.
    if i have several languages together in a spreadsheet is there a way to selectively only incoporate one of them into the build? so i have a specific build for each language which does NOT contain all other languages? i don't need to switch at runtime and try to minimize the build size.
     
  19. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    kaz2057: GoogleFu is designed with Google Spreadsheets integration in mind. You are able to work on a spreadsheet offline, and when you are ready to integrate it into your project, import it into Google Spreadsheets and let GoogleFu work it's magic. However a completely offline solution is not available at this time. This is a feature we are looking into for future releases.
     
  20. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Your best bet would be to separate the localization pages based on the builds you are making, and only import the pages which contain the appropriate localizations.

    This is an interesting feature request, and we'll put it on our wish list... but right now there is no way of selectively omitting specific columns.
     
  21. nagpalrajeev

    nagpalrajeev

    Joined:
    Jan 24, 2014
    Posts:
    1
    a lot of gaming companies I know are using google spreadsheets for run-time access. It works wonderfully and is not unreliable or slow. I believe that will be a good addition to your great tool.
     
  22. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    GoogleFu version 1.0.6 has been approved and is live now.

    Some of the fixes include:

    Fixed an issue with using Color as a type. GoogleFu is now generating the proper code in the custom editor script
    Fixed an issue with bool as a type. GoogleFu is now generating the proper code in the custom editor script
    Removed all using directives to maximize compatibility. This prevents Mono bringing in unnecessary libs that conflict with free versions of the build targets.
    Fixed a bug in the Database Object creation.
    Fixed index out of range exceptions with static databases.
    Changed a backslash to forward slash when exporting NGUI Localization, for Mac compatibility
    Added an option to JSON exporting to choose between automatically escaping Unicode characters or not (Experimental)
     
  23. Yiorgos

    Yiorgos

    Joined:
    Jun 5, 2013
    Posts:
    26
    Hello,

    I'm using Unity Indie (latest version) for Windows and I'm having issues trying to authorize GoogleFU with my google account. I'm using 2-step verification, I generated an app-specific code, but it doesn't seem to work.

    Moreover, after making a spreadsheet public and importing it (which worked), I tried again to authenticate and I got a message "Unable to find public spreadsheet at this URL". Yes, I got an error message for the import function when trying to authenticate. Weird, huh?

    Please look into it.

    Yiorgos

    EDIT/ADDITION: Exporting data from a public spreadsheet fails. It may be because the paths (either auto-created or manually selected) have forward slashes (/). WIndows local paths should have backslashes (\).

    Moreover, after failing, the imported spreadsheet is grayed out and can't be re-imported without quitting and restarting Unity (I get an "Unable to find public spreadsheet at this URL" error message).
     
    Last edited: Feb 21, 2014
  24. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    I absolutely will. Please email me at contact@litteratus.net so I can give you some one-on-one help. This seems to be a very specific issue. If it turns out to be a problem with GoogleFu, I'll update the app.

    Shane
     
  25. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    GoogleFu 1.0.7 was approved last night. This is just a quick fix for a very specific problem, but it did change the authentication procedure slightly.


    1.0.7
    Fixed an authentication issue when shared workbooks are marked as private/read only
     
  26. Yiorgos

    Yiorgos

    Joined:
    Jun 5, 2013
    Posts:
    26
    Seems like a specific issue indeed.
    I opened a blank new project, imported GoogleFu and everything worked, so there must be a conflict with some other asset in my project. Yes, I know I should have done that before posting my previous post :)

    I'll investigate it a bit on my own, and if I fail to find or resolve the issue myself, I'll reach you via email.

    Thank you :)
     
  27. IM_A_CAT_AMA

    IM_A_CAT_AMA

    Joined:
    Feb 22, 2014
    Posts:
    11
    This looks awesome! Can't wait to purchase it!
     
  28. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Nonsense. We'll figure it out. If it happened to you, it can happen to someone else, I'd like to get to the bottom of it ASAP :)
     
  29. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Overnight Yiorgos and I figured out his issue. It's a problem that I've mentioned in the documentation, but perhaps it's buried too deep.

    GoogleFu is incompatible with the WebPlayer build target.

    Here's why:
    The Unity network libraries do not care where the network traffic originates, be it your application or the editor itself. The network libraries restrict Cross Domain Communication when the WebPlayer target is active. This is a conscious decision by the folks at Unity, because cross domain communication introduces a whole host of problems. Unfortunately this is exactly what GoogleFu needs in order to authenticate.

    There is a work-around that you can use, but it only works on web servers that you have access to.. unfortunately we don't have access to Google's root.

    The good news is, you simply have to switch back to the PC/Mac target, and GoogleFu will work just fine. Yes I know this isn't ideal, sometimes it can take a very long time to switch platforms. Hopefully you won't need to do it often. I'm sorry to say that it's the best alternative I can offer for the moment. If anyone knows a better way, I'm extremely interested in an alternate solution.
     
  30. lin0603

    lin0603

    Joined:
    Jan 15, 2014
    Posts:
    1
    Hi Shane:

    GoogleFu looks really great.
    The only problem here is i don't know how to use it.

    It seems like the Documentation Link is broken. Is it possible to sent me a copy of the document?lin0603@gmail.com
    and I couldn't figure out how to generate custom Playmaker actions.
    Is there any tutorial or sample file to help me out?

    Thanks
    Lin
     
  31. larskroll

    larskroll

    Joined:
    Dec 17, 2013
    Posts:
    52
    Hey

    I just bought googleFu, and am looking forward to using it.
    I want to make derived values in my spreadsheet, e.g. damage pr second pr gold coin. these are values I don't need ingame: I need them to balance my items. Is it possible to mark a row as "don't include", so GoogleFu simply skips the row ? e.g. by providing a "do not include" id filed in the row, or something like that ? A work around of course is, to have the derived values in another sheet that references the data sheet, but I like to keep the overview by having it in the same place.
     
  32. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Currently there isn't a way to mark a Row/Column as "Do Not Include" but this is a feature that has been requested in the past.
    I will be looking into implementing it into the next release. Meanwhile using your formulas on another page that you do not include in the exported dataset is a totally viable workaround.

    Shane
     
  33. larskroll

    larskroll

    Joined:
    Dec 17, 2013
    Posts:
    52
    great !
    So far, it's been a breeze to use GoogleFu, and it has saved me a lot of time.
    well worth the way to low price
     
  34. kevincfy

    kevincfy

    Joined:
    Oct 12, 2012
    Posts:
    16
    Hi guys,

    I've been using this for a couple months now and it's helping me a lot!

    However, is there a list of data types we're allowed to use? Is it possible to use all the datatypes in Unity (and if so, how would you represent a Quaternion or Color for example). And is it possible to use our own datatypes?

    Just to give a practical use case - I'm working on something where google spreadsheets would be used for collaborative level design for a tile based game and I'd like to be able to flag different tiles (cells in Google Fu) with different statuses, so each cell would need to contain more than one piece of data, which I'd be able to do by having a different data type with arguments.
     
  35. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Quaternion and Color are both supported types and can be used by separating the elements with commas.
    Using a custom data type is probably easiest by just using a string type, and parsing the data yourself after retrieval. However if you are intent on using a complex data type that's parsed by GoogleFu, you can always add in a new type. When GoogleFu looks at the type, it's basically a switch statement of known types, and new types can be added very easily.

    I should put a table with all current supported types in the documentation.. I thought I did that already.. hmmm..
     
  36. kevincfy

    kevincfy

    Joined:
    Oct 12, 2012
    Posts:
    16
    I thought there might be a table with all supported types, which made me a little scared to ask here in case I hadn't looked for it hard enough!

    Thanks for getting back to me, I think I'll try and add the custom type :)
     
  37. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    can I upload data back to google spreadsheet ?
     
  38. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Currently GoogleFu is not designed to sync changes back to the spreadsheet. I have had discussions with users about adding the feature, but it is not implemented yet. I am planning on putting this in for the next major revision of the plugin.
     
  39. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Hi Shane, as you are updating googlefu, can I request for the multiple row into array feature
     
  40. ThatChaos

    ThatChaos

    Joined:
    Mar 29, 2013
    Posts:
    12
    Is there a way to use enums as a type or do I need to manually do that?
     
  41. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    GoogleFu is being updated regularly. I'm not sure what you mean by this feature request though. Could you provide an example of what you intend on using for input, and what you would expect for output? I think I might understand what you're asking, but I want to be certain.
     
  42. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Enum is not a valid type. However you are not the first person to ask about this, so we are considering adding it. The biggest problem is Enums wouldn't work at all in Playmaker, so we have to carefully consider how we add the functionality. Meanwhile, custom types are not too difficult to add on your own, there is a couple of places in the code were you would need to replicate how we are detecting and generating the code right now.

    I'm officially putting this on the list of things to do for the next release.
     
  43. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Hello, thanks for the great asset. Can you easily modify how the code/class of imported spreadsheet data is generated?( like adding certain method to class. Of course You can add it to the already generated class but that's useless since the class will be re-generated every time you import spreadsheet) .
     
  44. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Adding more functionality is fairly easy, look for the ExportDatabase method in GoogleFu.cs. The worst part about it is converting your code to a string to be printed out. Sometimes it takes a couple shots before you get all the escape sequences in the right places. Is there something in particular you are looking to support, or is it something for your personal project?
     
  45. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Ok I've found where to edit to add custom code in GoogleFu.cs. I just wanted to change it so you can easily access GoogleFuID column data(the first column) from row data. So I guess that's everything I needed to know. Thank you.
     
  46. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Oh, you could always use rowNames[ Index ], which contains the string of the ID column. Check out the custom inspector that is generated for the Database Object for an example.
     
  47. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    The email discussion we had for the multiple levels per item, so we define the same id in multiple rows, so the generated output can be access by an array

    item [level_id].stats
     
  48. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Ahh, I didn't recognize you by the username. Yes this is something that we discussed, and seems like it would be useful. We'll take a look and see how difficult it would be to implement. The only thing I can think that may be weird is if we go down this route, every row would essentially be an array with 1 or more elements in it. So it would make accessing a row by ID alone impossible, as you must specify an index as well. Again, we'll think on it and see if we can come up with an elegant solution that doesn't break current workflow.
     
  49. ThatChaos

    ThatChaos

    Joined:
    Mar 29, 2013
    Posts:
    12
    I'm still unfamiliar with this plugin so this may be a dumb question. Is there a easy way to pull out of the table all items with a certain value, or is this something that I need to implement myself? For example I have my enemy database structured with regions, and I'd like to spawn all enemies of region 1 without having to hardcode the row/names of the enemies.
     
  50. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    It's ok if I need to put an array column in the spreadsheet if it helps googlefu detect and make the array. I think that will work best, will not disrupt current workflow