Unlistens to action changes on resource browser master destroyed.

This commit is contained in:
2023-12-25 14:37:27 +08:00
parent 8bb2a01c8e
commit 5241490590

View File

@@ -40,6 +40,10 @@ namespace Cryville.Crtr.Browsing.UI {
AddPathedBrowserTab("Files", new FileSystemResourceManager());
AddTab("Settings", InitBrowser(m_settingsBrowser), _tabs.Count, false);
}
protected override void OnDestroy() {
base.OnDestroy();
Actions.Changed -= OnActionsChanged;
}
BrowserTab AddPathedBrowserTab(string name, IPathedResourceManager<IResourceMeta> manager) {
var browser = InitBrowser(Instantiate(m_pathedBrowserPrefab, m_browserContainer, false).GetComponent<PathedResourceBrowser>());