Navigation
API > API/Editor > API/Editor/UnrealEd > API/Editor/UnrealEd/FLevelEditorViewportClient
Description
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.
| Name | TryPlacingActorFromObject |
| Type | function |
| Header File | /Engine/Source/Editor/UnrealEd/Public/LevelEditorViewport.h |
| Include Path | #include "LevelEditorViewport.h" |
| Source | /Engine/Source/Editor/UnrealEd/Private/LevelEditorViewport.cpp |
static TArray < AActor * > TryPlacingActorFromObject
(
ULevel * InLevel,
UObject * ObjToUse,
bool bSelectActors,
EObjectFlags ObjectFlags,
UActorFactory * FactoryToUse,
const FName Name,
const FViewportCursorLocation * Cursor
)
true if the object was successfully used to place an actor; false otherwise
Parameters
| Name | Remarks |
|---|---|
| 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 |