Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.7 KB

File metadata and controls

42 lines (29 loc) · 1.7 KB

Feature

StringTableCollectionBundle

This feature is useful if you want to pull multiple "StringTableCollection"s at once.

  • Right click -> Create -> Tsgcpp -> Localization Extension -> StringTableCollectionBundle
  • Select StringTableCollectionBundle (ScriptableObject)
  • Set SheetsServiceProvider
  • Set folders that contain "StringTableCollection"s
  • Click Pull or Push for the synchronization

image

ServiceAccountSheetsServiceProvider (for Google Sheets)

This feature is useful if you want to use GCP Service Account to access Google Sheets. Private Google Sheets can be accessed by using GCP Service Account. Here is the example code.

    var bundle = AssetDatabase.LoadAssetAtPath<StringTableCollectionBundle>(path);

    var provider = new ServiceAccountSheetsServiceProvider(
        serviceAccountKeyJson: "<GCP Service Account Key (Json format)>",
        applicationName: bundle.SheetsServiceProvider.ApplicationName);

    bundle.PullAllLocales(provider);

See an example ExampleLocalizationSynchronizationMenu.cs.

Appendix: Service Account Setting

  • Create GCP service account

image

  • Share the sheets with the service account
    • Viewer: Only Pull
    • Editor: Pull and Push

image image