Select Actor Component via C++
USelection* SelectedComps = GEditor->GetSelectedComponents();
SelectedComps->DeselectAll();
GEditor->SelectComponent(Component, true, true, true);
GEditor->NoteSelectionChange();Last updated
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.
NoteSelectionChange() updates the gizmo in the viewport and calls appropriate delegates.
Last updated