UActorFactoryStaticMesh::GetAssetFromActorInstance

Given an instance of an actor, find the wrapped asset object which can be used to create a valid [FAssetData](API\Runtime\CoreUObject\AssetRegistry\FAssetData).

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

UActorFactory::GetAssetFromActorInstance()

UActorFactoryStaticMesh::GetAssetFromActorInstance()

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Classes/ActorFactories/ActorFactoryStaticMesh.h

Include

#include "ActorFactories/ActorFactoryStaticMesh.h"

Source

/Engine/Source/Editor/UnrealEd/Private/Factories/ActorFactory.cpp

Syntax

virtual UObject * GetAssetFromActorInstance
(
    AActor * ActorInstance
)

Remarks

Given an instance of an actor, find the wrapped asset object which can be used to create a valid FAssetData. Returns nullptr if the given ActorInstance is not valid for this factory. Override this function if the factory actor is a different class than the asset data's class which this factory operates on. For example, if this is the static mesh actor factory, the class of the asset data is UStaticMesh, but the actor factory's class is AStaticMeshActor