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.
| IToolsContextAssetAPI::GenerateStaticMeshActor()
|
Module |
|
Header |
/Engine/Source/Editor/UnrealEd/Public/Tools/EditorToolAssetAPI.h |
Include |
#include "Tools/EditorToolAssetAPI.h" |
virtual AActor * GenerateStaticMeshActor
(
UWorld * TargetWorld,
FTransform Transform,
FString ObjectBaseName,
FGeneratedStaticMeshAssetConfig && AssetConfig
)
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.
new AStaticMeshActor with new Asset assigned to it's UStaticMeshComponent
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 |