Downloads

← Back GoogleSheets export/import for Runtime
Version:
0.9Beta
Format:
Unity package
Dependencies:
BGDatabase (version >= 1.5.11)

Description

Export/import to GoogleSheets at runtime. Some restrictions apply (read below)

Restrictions:

  1. Use this plugin only if you have one, single device, writing to Google Sheets spreadsheet. Number of devices, reading data from Google Sheets spreadsheet, is not restricted by us (maybe Google has its own limitations) If you do not want to export data to Google Sheets spreadsheet, there is an alternative solution exists.
  2. If you are looking for a method to update database data using GoogleSheet data in runtime, please, use LiveUpdate addon
  3. If all you need is to add new rows to Google Sheets, the better solution exists - read this post for more details
  4. All credentials, you provide to connect to GoogleSheets, will be exposed

Setup (Mono)

  1. Install BGDatabase (version >= 1.5.11)
  2. Install GoogleSheets Editor plugin
  3. Install this plug-in
  4. Move (not copy!) all DLL files under folder Assets\BansheeGz\BGDatabaseGoogleSheetsEditor\Editor\Libs to runtime assembly (let's say to Assets/GDataV4 folder, we will use this folder as a reference, but this can be any folder not under Editor folder)
  5. Move (not copy!) the following DLL fileAssets\BansheeGz\BGDatabaseGoogleSheetsEditor\Editor\Scripts\BGDatabaseEditorGoogleSheets.dll. to the same folder (Assets/GDataV4 folder)
  6. Now we need to replace Newtonsoft.Json.dll with its AOT variant.
    1. Delete this DLL Assets\GDataV4\Newtonsoft.Json.dll
    2. Download and install Assets\JsonDotNet\Assemblies\AOT\Newtonsoft.Json.dll DLL file from this JSON package. You can also download it here
    3. Move Assets\JsonDotNet\Assemblies\AOT\Newtonsoft.Json.dll file to Assets/GDataV4 folder
  7. Select any single DLL file under moved folder Assets/GDataV4. Mark it to target Any platform in Inspector. Make sure "Excluded platforms" are unchecked. Also uncheck "Validate references" (use the screenshot as a reference). Hit Apply button
  8. Create GoogleSheets datasource in BGDatabase window (under DataSources tab) and fill in all required parameters
  9. Add Assets\BGDatabaseGoogleSheetsRuntime\BGGoogleSheetsManagerGo.cs component to any GameObject inside your scene
  10. Copy all settings from GoogleSheets datasource (you created at step 8 to BGGoogleSheetsManagerGo script settings
  11. Toggle on Enable Setting parameter if you want to set up which tables/fields need to be updated. Settings are similar to Merge settings
  12. Run the scene, expand "GoogleSheets>>" button and press "Export" or "Import" button
  13. There is also an option to disable BGGoogleSheetsManagerGo's GUI and call BGGoogleSheetsManagerGo.Export and BGGoogleSheetsManagerGo.Import methods from your own scripts. Note, the task runs on separate thread and may take several frames to complete.

Setup (IL2CPP)

tested with Unity 2022 LTS

  1. Switch to NetStandard 2.1 API level
  2. Install BGDatabase (version >= 1.5.11)
  3. Uninstall this plugin if it's installed
  4. Install this package
  5. See the Mono setup guide (above) for setting up BGGoogleSheetsManagerGo script

Releases

Click to see all releases
Version Release date Log
0.9Beta July 17, 2020 Beta development
← Back to Downloads