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
)

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)

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