So I have a function that needs to be called everytime my EditorWindow is manually resized however it is quite a slow function so I don’t want to call it constantly while resizing the window, just once when the resizing has finished. Is there anyway to detect when a Window is being resized other than just checking the size against the last frame? Because that method isn’t very effective as when dragging slowly for example, the size doesn’t actually change every frame so you can’t clearly detect when the resizing starts/stops
Thanks
edit
So I have this, and it works except for that I have to click the EditorWindow after resizing for it to trigger. My guess being that the resizing of the window “uses” the MouseUp event so it can’t be detected. Any suggestions?
if (window.position.size != lastWindowSize)
resizeChk = true;
else if(Event.current.isMouse && Event.current.type == EventType.MouseUp)
resizeChk = false;
lastWindowSize = window.position.size;