AHUD::GetActorsInSelectionRectangle

Returns the array of actors inside a selection rectangle, with a class filter.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/HUD.h

Include

#include "GameFramework/HUD.h"

Source

/Engine/Source/Runtime/Engine/Private/HUD.cpp

Syntax

void GetActorsInSelectionRectangle
(
    TSubclassOf < AActor > ClassFilter,
    const FVector2D & FirstPoint,
    const FVector2D & SecondPoint,
    TArray < AActor * > & OutActors,
    bool bIncludeNonCollidingComponents,
    bool bActorMustBeFullyEnclosed
)

Remarks

Returns the array of actors inside a selection rectangle, with a class filter.

Sample usage: TArray ActorsInSelectionRect; Canvas->GetActorsInSelectionRectangle(FirstPoint,SecondPoint,ActorsInSelectionRect);

Returns

OutActors The actors that are within the selection box according to selection rule

Parameters

Parameter

Description

FirstPoint

The first point, or anchor of the marquee box. Where the dragging of the marquee started in screen space.

SecondPoint

The second point, where the mouse cursor currently is / the other point of the box selection, in screen space.

bIncludeNonCollidingComponents

Whether to include even non-colliding components of the actor when determining its bounds

bActorMustBeFullyEnclosed

The Selection rule: whether the selection box can partially intersect Actor, or must fully enclose the Actor.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback