Select Actor Component via C++
USelection* SelectedComps = GEditor->GetSelectedComponents();
SelectedComps->DeselectAll();
GEditor->SelectComponent(Component, true, true, true);
GEditor->NoteSelectionChange();
If you don't call the deselect function then it adds the component to the selection rather than exclusively selecting it.
Last updated