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
orPush
for the synchronization
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.
- Create GCP service account
- Share the sheets with the service account
- Viewer: Only Pull
- Editor: Pull and Push