FLevelEditorViewportClient::TryPlacingActorFromObject

Static: Attempts to place the specified object in the level, returning one or more newly-created actors if successful.

Windows
MacOS
Linux

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/LevelEditorViewport.h

Include

#include "LevelEditorViewport.h"

Source

/Engine/Source/Editor/UnrealEd/Private/LevelEditorViewport.cpp

Syntax

static TArray< AActor * > TryPlacingActorFromObject
(
    ULevel * InLevel,
    UObject * ObjToUse,
    bool bSelectActors,
    EObjectFlags ObjectFlags,
    UActorFactory * FactoryToUse,
    const FName Name,
    const FViewportCursorLocation * Cursor
)

Remarks

Static: Attempts to place the specified object in the level, returning one or more newly-created actors if successful. IMPORTANT: The placed actor's location must be first set using GEditor->ClickLocation and GEditor->ClickPlane.

Returns

true if the object was successfully used to place an actor; false otherwise

Parameters

Parameter

Description

InLevel

Level in which to drop actor

ObjToUse

Asset to attempt to use for an actor to place

CursorLocation

Location of the cursor while dropping

bSelectActors

If true, select the newly dropped actors (defaults: true)

ObjectFlags

The flags to place on the actor when it is spawned

FactoryToUse

The preferred actor factory to use (optional)

Cursor

Optional pre-calculated cursor location

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss