- Home /
Editor script multi-selection?
How would I have an editor script restore a user selection in OnSelectionChange() if the user actually changes the selection? I've tried recreating the selection and sending it to Selection.objects = blablabla.ToArray() but that didn't work either... nor does it throw any complaints.
Has anyone figure out a way to store a user selection to be recalled later?
Thanks!
Should I repost this question for more visibility? I'm at a loss as to how to solve this and feel like there's just a lack of functionality with Unity's selection handling.
Can storing/recalling a multi-selection even possible?
Given that there is a SaveSelection() and also LoadLastSavedSelection() given as examples in the docs, people might be wandering what else you want to know - which is not very clear. http://docs.unity3d.com/ScriptReference/EditorWindow.OnSelectionChange.html
Richyrich,
Thank you for your response! It's better to hear that someone doesn't understand my problem than the sound of crickets. At least I now know that I was being too vague, a problem I sometimes have when trying not to insult the intelligence of others by UNDER-explaining! sigh
I've seen several examples of this being done but none of them worked for me. I have seen that page in the docs you sent. (Thanks for sending, btw.) I had tried a variation on that code that I felt should have worked, but didn't. Unfortunately for me, I didn't even think to go back and try that bit of code. Seeing it now, I have a feeling that I can only use Selection.instanceIDs. Oddly, nothing else worked (Selection.objects, Selection.gameObjects, etc.).
I'll give it another go. Thanks again!
Your answer
Follow this Question
Related Questions
Auto-Selecting something else in Scene-View? 0 Answers
Selecting a range of hex tiles within radius of main tile 1 Answer
How can I set a selection-sphere in the editor 1 Answer
Preventing editor deselect on MacOS 1 Answer
Editor selection order 2 Answers