- Home /
GUI Focusing multiple windows
Hi, I need to be able to Shift+click multiple GUI windows so that they can all be moved together.
I know that GUI.FocusWindow can focus one window at a time but I don't know what code will allow multiple windows to be selected and moved as one.
Answer by Bunny83 · Feb 05, 2013 at 04:55 PM
Unity doesn't support selecting multiple windows at the same time exactly like most operating systems. Ever selected two windows at the same time?
You have to implement your own "selection" logic which isn't based on one window ID but uses an array / List of IDs instead. Of course you need your own movement logic as well. That's all not super complicated, but also not trivial. I can't provide you any code since that would probably be too much for a UA answer.
I would start by wrapping a window in a custom class, that way it's way easier to reference a certain window or certain properties of it.
Thats what I thought. I'll have to manually take care of the current selected windows moving their Rects manually. Thanks @Bunny83 !