On the initial version, I2 Localization used the developer's Username and Password to access Google. However, while that can make things easier on the developer's computer, it present a security risk to save the credentials in the deployed build so that it could download any changes.


This issue was solved by creating a Web Service that runs on the developer's Google Drive and works as an intermediary between the game and the spreadsheets.

The following steps show how to do it.


This process its also explained here


Steps

Action

1.

Click Install to make a copy of the WebService source code on your Google Drive.


2.

A script will open on your web browser.

On the menu, select Publish and then Deploy as web app

3.

In the window that opens

  - click "Save Version"

  - In "Execute app as:"  select "me(your email)"

  - In "Who has access to the app:" select "Anyone, even anonymous"

4.

In the new window that opens, Copy the URL at "Current Web App URL".


That URL will have the format:

https://script.google.com/macros/s/XXXX/exec

8.

In the menu, select Run and then DoGet

And authorize the script to access your spreadsheets and file date data

9.

Back in Unity, paste the URL in the Web Service URL

And click Verify to see that the editor can access Google.

Once the Web Service is online, you can:

    • Click the New button to create a new Spreadsheet in the Google Drive and use it for your localizations
    • Click the Refresh button to download a list of all the existing Spreadsheets and allow you to select the one you want to link with.
    • After you selected or created a new Spreadsheet, use the Open button to open the Spreadsheet in the web browser



Once everything is setup, use the Import or Export to Download / Upload the localization data. On each of the Import/Export sections, there are buttons to replace all the existing data with the new one, only changing (Merging) the existing elements in both the new and the old data and to only add the new terms/languages. 




One the localization data is created, if the Open Spreadsheet after Export is enable, then the browser will open the Spreadsheet.



Also, as an extra security measure, the plugin will only access Spreadsheets whose name starts with  I2Loc.  

(e.g. "I2Loc MyGame", but not "MyGame")

This makes even safer for your google drive content, by only sharing and accessing the spreadsheets intended to be public and used for I2 Localization.

If you want to modify the prefix used (e.g. use "YourCompany" instead of "I2Loc"), just open the webService in google drive and modify the LocalizationPrefix variable at line 41


      var LocalizationPrefix = "I2Loc";

Created with the Personal Edition of HelpNDoc: Free help authoring tool