Skip to content

Commit

Permalink
[SDK-721] Add clearing of panel switcher (#194)
Browse files Browse the repository at this point in the history
## [SDK-721](https://ready-player-me.atlassian.net/browse/SDK-721)

## Description

- Added clear functionality in panel switcher, which will be called on OnDestroy
  • Loading branch information
rYuuk authored Jan 2, 2024
1 parent 714e580 commit 94aee60
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 94aee60

Please sign in to comment.