FEditorToolAssetAPI::GenerateStaticMeshActor

Create a new UStaticMeshAsset for the provided mesh, then a new [UStaticMeshComponent](API\Runtime\Engine\Components\UStaticMeshComponent) and [AStaticMeshActor](API\Runtime\Engine\Engine\AStaticMeshActor) in the TargetWorld

Windows
MacOS
Linux

Warnings

  • this function may return null. In this case the asset creation failed and/or the user cancelled during the process, if it was interactive.

Override Hierarchy

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/Tools/EditorToolAssetAPI.h

Include

#include "Tools/EditorToolAssetAPI.h"

Syntax

virtual AActor * GenerateStaticMeshActor
(
    UWorld * TargetWorld,
    FTransform Transform,
    FString ObjectBaseName,
    FGeneratedStaticMeshAssetConfig && AssetConfig
)

Remarks

Create a new UStaticMeshAsset for the provided mesh, then a new UStaticMeshComponent and AStaticMeshActor in the TargetWorld

this function may return null. In this case the asset creation failed and/or the user cancelled during the process, if it was interactive.

Returns

new AStaticMeshActor with new Asset assigned to it's UStaticMeshComponent

Parameters

Parameter

Description

TargetWorld

world to create new Actor in

Transform

transform to set on Actor

ObjectBaseName

a base name for the Asset and Actor. Unique name will be generated by appending a number, if a name collision occurs.

AssetConfig

configuration information for the new Asset

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