Google Sheets

SG Google Sheets is a tool for interacting with google tables. Usefull and extensible solution. You can easily create mapping using attributes. Your code will be clean and correct using our system.

Settings

To open settings window go to Tools -> SIDGIN -> Google Sheets -> Settings.

image-1590958225564.png

Load Sheets On Game Start - this setting is necessary for the system to download data from Google Sheets before launching the game.

Tables is a list of links to Google Sheets tables.


Add Table


Set table name and push on plus button.

step1.png

In the window that opens, put a link to the Google spreadsheet.
step2.png
If required allow access to Google Sheet table.  When loading will be done push continue button.
step3.png
Push complete button.

Edit table

step4.png
  1. Table name field, set new name if you want rename;
  2. Table link status;
  3. Change table button, push for change link;
  4. Complete button, click for change mode to ”Normal”;
  5. Delete table button;

Reset credentials


If you want logout from Google account go to Settings and click on button "Reset Authorization".

image-1590959696418.png



Import credentials


If you want use your Google Api Application, follow steps.

Load data

For load data for all scriptable objects go to SIDGIN/Google Sheets/Load from Google.

step8.png

Mapping

The first step you need to create an entity that matches one row of the table. Use the GoogleSheetParam attribute for fileds. As an argument, you must specify the name of the column header. The class must define the ”System.Serializable” attribute.

code_1.png

Next, you need to create a ScriptableObject class with list of entity. For this class you need to define the ”GoogleSheet” attribute.

code_2.png

GoogleSheet attribute arguments:

  1. Table Name;
  2. Sheet Name;

You must also inherit the ICollectionSet interface. It’s necessary for the system to update data.

Advanced

Advanced

Import custom credentials

If you want use your Google Api Application (Google Api Console) our system can use your credentials.

To configure it follow steps:

  1. Create app: Google Cloud Console.
  2. After create the project you must create credentials: Google Cloud Console.step6.png

After creating credentials, download them.step7.png

Click to ”Import credentials” button and select credentials file.

Code Samples