Skip to content

Commit 6b42948

Browse files
authored
Merge pull request #26 from tsgcpp/feature/fix_hide_collections_in_inspector
fix: Hide "StringTableCollection"s if the flag is off
2 parents 227bfd9 + e2aab7a commit 6b42948

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Assets/Plugins/LocalizationExtension/Editor/Google/StringTableCollection/StringTableCollectionBundle.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ public void PushAllLocales(
7474
serviceProvider: serviceProvider,
7575
reporter: reporter,
7676
sleepSecondsPerRequest: SleepSecondsPerRequest);
77-
7877
}
7978

8079
private void ValidateProperties()

Assets/Plugins/LocalizationExtension/Editor/Google/StringTableCollection/StringTableCollectionBundleEditor.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,15 @@ private void DrawStringTableCollections()
7272
};
7373

7474
_showStringTableCollections = EditorGUILayout.Foldout(_showStringTableCollections, "Target \"StringTableCollection\"s", foldoutStyle);
75+
if (!_showStringTableCollections)
76+
{
77+
return;
78+
}
7579

76-
var stringTableCollections = _stringTableCollectionsConverter.Convert(Bundle.TargetFolders);
7780
using var h = new EditorGUILayout.VerticalScope(GUI.skin.box);
7881
using var g = new EditorGUI.DisabledGroupScope(true);
82+
83+
var stringTableCollections = _stringTableCollectionsConverter.Convert(Bundle.TargetFolders);
7984
foreach (var collection in stringTableCollections)
8085
{
8186
EditorGUILayout.ObjectField(collection, typeof(StringTableCollection), allowSceneObjects: false);

0 commit comments

Comments
 (0)