GetWindow vs GetWindowWithRect
Hello.
I have the following question:
GetWindow returns this :
GetWindowWithRect returns this :
Code :
GetWindow<TestWindow>(false, "Test");
GetWindowWithRect<TestWindow>(new Rect(100, 100, 500, 600),false, "Test");
For some reason GetWindowWithRect returns a different window (without yellow outline).. is there any way to change the style of the window ?
Answer by Adam-Mechtley · Oct 24, 2016 at 09:28 AM
Hi @Vladislav-Videnov! What's actually happening is that when a window's minSize and maxSize are equal (which happens when you call GetWindowWithRect<T>()), then you lose the ability to resize it, which appears as a yellow outline on your OS. If you want to retain the ability to resize the window and also specify a rect, just set EditorWindow.position after you create or locate it. That said, I'm not sure if it is really desirable behavior that GetWindowWithRect<T>()) is setting a min and max position, so it might be worth filing a bug report.
Your answer
Follow this Question
Related Questions
Custom EditorWindow indicator 0 Answers
Create a greyed out value field in the editor? 2 Answers
Making a custom editor window much like the Animator window? 0 Answers
Editor Window 1 Answer
GUİ Editor Window input 0 Answers