Hey guys!
I’ve been searching for this a bit now but I can’t seem to figure out how to do it.
I’d like to write a tool that deselects the currently selected GameObjects in the Editor (Scene View) and instead selects their parents.
While I can store the selected GOs in an array using GameObject[] selection = Selection.gameObjects
and I know how to figure out their parents (parent = selection*.transform.parent
), I don’t know how to make them being selected in the Scene View (since Selection.gameObjects
is read-only).*
Thanks in advance!
Best regards.