Search Unity

[Editor Scripting] How to select objects ? Inverse to "Selection.GetTransforms"

Discussion in 'Scripting' started by daville, Jun 23, 2020.

  1. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    I have a List of Transforms, I want to set that list as the current selected objects in Scene.

    basically the inverse action to Selection.GetTransforms, with this I can GET the selected objects, I want to SET them.

    a use case example:

    "I select a lot of objects on scene view, read the selection inside an editor window, choose some of them, then I want to only keep selecting the chosen ones"
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,744