Skip to content

Commit

Permalink
fix: add clearing of panel switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
rYuuk committed Dec 20, 2023
1 parent 3ec98a0 commit 460348b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ private void OnDisable()
outfitCategoryButton.RemoveListener();
}

private void OnDestroy()
{
PanelSwitcher.Clear();
}

private void Initialize()
{
categoryButtonsMap = new Dictionary<AssetType, CategoryButton>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ public static void Switch(AssetType category)
}
}

public static void Clear()
{
CategoryPanelMap?.Clear();
}

private static void DisableAllPanels()
{
foreach (var panels in CategoryPanelMap)
Expand Down

0 comments on commit 460348b

Please sign in to comment.