- Home /
How do you set minimum EditorWindow size when undocked?
I'm working on an Editor Extension that lives inside an EditorWindow
. It has a minimum vertical size of roughly 730 pixels. A decent minimum horizontal size is roughly 900 pixels. I've set this using the minSize
property but now it appears that this makes docking the window a really untenable option: it forces the layout when docked to change.
I would really like to make this a modal thing: when Windowed, use the minimum size. When Docked, allow free resize (probably standard min of 100x100px).
I don't mind users trying to shrink down the window and hiding the content, I just want a reasonable first use size: make sure that when it opens it isn't hiding a whole bunch of content.
Any recommendations on how to do this? I've seen that there is a way to access the docked status of an EditorWindow
but it isn't terribly kosher (uses reflection to grab an internal field). How should I best handle this?
Your answer
Follow this Question
Related Questions
Setting position based on size of elements on a layout group 1 Answer
Vertical layout element alignment issue with content size fitter 0 Answers
How do I keep GUI Buttons one size? 1 Answer
Retreive the Width Delta of a ContentSizeFitter game object 0 Answers
GUIContent with an image and text getting not drawing image 0 Answers