File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ public static void ShowWindow()
6565 {
6666 GetWindow < HideInactiveObjects > ( "Hide Inactive Objects" ) ;
6767 }
68+
69+ bool showError = false ;
6870
6971 private void OnGUI ( )
7072 {
@@ -91,12 +93,16 @@ private void OnGUI()
9193
9294 if ( GUILayout . Button ( isHiddenObjects ? "Hide" : "Display" ) )
9395 {
94- ToggleOption ( ) ;
95- }
96-
97- if ( targetObjects != null )
98- {
96+ Debug . Log ( $ "targetObjects.Count: { targetObjects . Count ( ) } ") ;
97+
98+ if ( targetObjects . Count ( ) == 0 && ! enableForWholeHierarchy ) showError = true ;
9999
100+ else {
101+ Toggle ( ) ;
102+ showError = false ;
103+ }
100104 }
105+
106+ if ( showError ) GUILayout . Label ( "Error: Object を指定するか Hierarchy 全体に設定を有効化してください" , new GUIStyle ( ) { normal = new GUIStyleState ( ) { textColor = Color . red } } ) ;
101107 }
102108}
You can’t perform that action at this time.
0 commit comments