@@ -175,7 +175,7 @@ private static GObject SearchChild(GComponent o, Queue<string> q)
175175
176176 if ( index < 0 || index >= o . numChildren )
177177 {
178- throw new Exception ( "eror path" ) ;
178+ throw new Exception ( "Invalid UI path: index out of range " ) ;
179179 }
180180
181181 child = o . GetChildAt ( index ) ;
@@ -188,7 +188,7 @@ private static GObject SearchChild(GComponent o, Queue<string> q)
188188
189189 if ( child == null )
190190 {
191- throw new Exception ( "error path" ) ;
191+ throw new Exception ( "Invalid UI path: child not found " ) ;
192192 }
193193
194194 if ( q . Count <= 0 )
@@ -202,7 +202,7 @@ private static GObject SearchChild(GComponent o, Queue<string> q)
202202 return SearchChild ( child as GComponent , q ) ;
203203 }
204204
205- throw new Exception ( "error path" ) ;
205+ throw new Exception ( "Invalid UI path: not a GComponent " ) ;
206206 }
207207
208208 /// <summary>
@@ -217,7 +217,7 @@ private static GObject SearchChild(GComponent o, Queue<string> q)
217217 [ UnityEngine . Scripting . Preserve ]
218218 public static bool SearchPathInclude ( string path , GObject gObject )
219219 {
220- if ( "all" . ToLower ( ) == path )
220+ if ( string . Equals ( path , "all" , StringComparison . OrdinalIgnoreCase ) )
221221 {
222222 return false ;
223223 }
@@ -267,9 +267,7 @@ public static bool SearchPathInclude(string path, GObject gObject)
267267 continue ;
268268 }
269269
270- {
271- return false ;
272- }
270+ return false ;
273271 }
274272
275273 return false ;
0 commit comments