I’m trying to debug a popup window I created according to this guide:
In the UI Toolkit Debugger, I can see the popup window listed in the dropdown of available windows, but opening that dropdown takes focus away from the popup window, causing it to close, so if I choose the popup window from that list, it launches nothing in the Debugger.
Is there a way to tell the PopupWindowContent class to not execute its normal Close procedure when it loses focus?
It’s not the popup window class that closes the window, the window is created as a dropdown window, which is a window type that automatically closes itself. I’m not sure where these windows are closed but it might happen in the native Unity code and is likely difficult to change.
But you could create a regular window that shows the same content to use for debugging. Either replicated the API of the PopupWindow class or put your UI into a regular EditorWindow class.
Hello. As @Adrian mentioned there’s is no built-in function to keep your popup window open when debugging it at the moment. The only workaround is indeed to put your UI in a regular EditorWindow