marijnz / unity-toolbar-extender

Extend the Unity Toolbar with your own Editor UI code.
MIT License
1.67k stars 168 forks source link

Fix disappearing custom toolbars #35

Open bryanmcconkey opened 10 months ago

bryanmcconkey commented 10 months ago

It would appear that when dragging Unity between monitors with different DPI settings (as described in https://github.com/marijnz/unity-toolbar-extender/issues/34) that the root visual element is detached, but m_currentToolbar does not become null.

To address this issue I registered for the DetachFromPanelEvent and clear the m_currentToolbar variable to trigger the setup process again.