Skip to content

Commit 360fd84

Browse files
committed
refactor: 提取循环变量以提高代码可读性
1 parent b2d59dd commit 360fd84

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Runtime/UIComponent.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,10 @@ private void Start()
351351
#endif
352352
for (int i = 0; i < m_UIGroups.Length; i++)
353353
{
354-
if (!AddUIGroup(m_UIGroups[i].Name, m_UIGroups[i].Depth))
354+
var uiGroup = m_UIGroups[i];
355+
if (!AddUIGroup(uiGroup.Name, uiGroup.Depth))
355356
{
356-
Log.Warning("Add UI group '{0}' failure.", m_UIGroups[i].Name);
357+
Log.Warning("Add UI group '{0}' failure.", uiGroup.Name);
357358
continue;
358359
}
359360
}

0 commit comments

Comments
 (0)