UEditorLevelLibrary::SpawnActorFromObject

Create an actor and place it in the world editor.

Windows
MacOS
Linux

References

Module

EditorScriptingUtilities

Header

/Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Public/EditorLevelLibrary.h

Include

#include "EditorLevelLibrary.h"

Source

/Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Private/EditorLevelLibrary.cpp

Syntax

[UFUNCTION](Programming/UnrealArchitecture/Reference/Functions)(BlueprintCallable, Category="Editor Scripting | Level Utility")
static AActor * SpawnActorFromObject
(
    class UObject * ObjectToUse,
    FVector Location,
    FRotator Rotation
)

Remarks

Create an actor and place it in the world editor. The Actor can be created from a Factory, Archetype, Blueprint, Class or an Asset. The actor will be created in the current level and will be selected.

Returns

The created actor.

Parameters

Parameter

Description

ObjectToUse

Asset to attempt to use for an actor to place.

Location

Location of the new actor.

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