Skip to content

Commit 360e99f

Browse files
committed
Bugfix: Fix loop that was not deleting as any elements as expected
1 parent 52df4dd commit 360e99f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

general/ui/tab/TabManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ public static PowersTab CreateTab(string name, string pTitleKey, string pDescKey
399399
tab_entry.transform.Find("Icon").GetComponent<Image>().sprite = pIcon;
400400

401401
PowersTab tab = Object.Instantiate(
402-
ResourcesFinder.FindResources<GameObject>("other")[0].GetComponent<PowersTab>(),
402+
ResourcesFinder.FindResources<GameObject>(PowerTabNames.Creatures)[0].GetComponent<PowersTab>(),
403403
tab_container);
404404

405405
tab.name = name;
@@ -424,9 +424,9 @@ public static PowersTab CreateTab(string name, string pTitleKey, string pDescKey
424424
tab_entry_tip.textOnClickDescription = pDescKey;
425425
tab_entry_tip.text_description_2 = pOptionDescKey;
426426
// Clear tab content
427-
for (int i = 7; i < tab.transform.childCount; i++)
427+
for (int i = 6; i < tab.transform.childCount; i++)
428428
{
429-
GameObject.Destroy(tab.transform.GetChild(i).gameObject);
429+
Object.Destroy(tab.transform.GetChild(i).gameObject);
430430
}
431431

432432
tab._power_buttons.Clear();

0 commit comments

Comments
 (0)