RealDocs

AActor::IsSelectionChild

function Engine Since 4.20
#include "GameFramework/Actor.h"
Access: public Specifiers: virtualENGINE_APIconst

Description

Returns whether this actor is part of another actor's selection group in the editor. When true, this actor cannot be independently selected — it is always selected through its parent.

Caveats & Gotchas

  • Like IsSelectionParentOfAttachedActors(), this is an editor-selection concept only and has no runtime effect.
  • If you return true here, the editor will route selection clicks through GetSelectionParent() — make sure GetSelectionParent() returns a valid non-null actor or the selection system may crash.
  • The default implementation returns false, meaning actors are independently selectable by default.

Signature

ENGINE_API virtual bool IsSelectionChild() const

Return Type

bool

Example

Make an actor always be selected through its parent C++
bool AMyChildActor::IsSelectionChild() const
{
    // This actor is always selected as part of its parent group
    return GetSelectionParent() != nullptr;
}

Version History

Introduced in: 4.20

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.