Navigation
API > API/Editor > API/Editor/UnrealEd > API/Editor/UnrealEd/ActorFactories
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorFactory
- UActorFactoryAmbientSound
- UActorFactoryBlueprint
- UActorFactoryBoxReflectionCapture
- UActorFactoryCacheManager
- UActorFactoryCameraActor
- UActorFactoryCharacter
- UActorFactoryClass
- UActorFactoryDatasmithScene
- UActorFactoryDeferredDecal
- UActorFactoryDirectionalLight
- UActorFactoryEmitter
- UActorFactoryEmptyActor
- UActorFactoryPawn
- UActorFactoryEnvironmentQuery
- UActorFactoryExponentialHeightFog
- UActorFactoryGeometryCache
- UActorFactoryLocalHeightFog
- UActorFactoryNiagara
- UActorFactoryNote
- UActorFactoryPhysicsAsset
- UActorFactoryPlanarReflection
- UActorFactoryPlaneReflectionCapture
- UActorFactoryPlayerStart
- UActorFactoryPointLight
- UActorFactoryRectLight
- UActorFactoryRuntimeVirtualTextureVolume
- UActorFactorySkeletalMesh
- UActorFactoryAnimationAsset
- UActorFactorySkyAtmosphere
- UActorFactorySkyLight
- UActorFactorySphereReflectionCapture
- UActorFactorySpotLight
- UActorFactoryStaticMesh
- UActorFactoryBasicShape
- UActorFactoryInteractiveFoliage
- UActorFactoryTargetPoint
- UActorFactoryText3D
- UActorFactoryTextRender
- UActorFactoryTriggerBox
- UActorFactoryTriggerCapsule
- UActorFactoryTriggerSphere
- UActorFactoryVectorFieldVolume
- UActorFactoryVolume
- UActorFactoryBoxVolume
- UActorFactoryCylinderVolume
- UActorFactorySphereVolume
- UActorFactoryVolumetricCloud
- UCustomizableObjectInstanceFactory
- UGroomActorFactory
- ULevelVariantSetsActorFactory
- UPaperFlipbookActorFactory
- UPaperSpriteActorFactory
- USwitchActorFactory
- UTerrainSplineActorFactory
- UTileMapActorFactory
References
| Module | UnrealEd |
| Header | /Engine/Source/Editor/UnrealEd/Classes/ActorFactories/ActorFactory.h |
| Include | #include "ActorFactories/ActorFactory.h" |
Syntax
class UActorFactory :
public UObject,
public IAssetFactoryInterface
Variables
| Type | Name | Description | |
|---|---|---|---|
| uint32: 1 | bShowInEditorQuickMenu | Whether to appear in the editor add actor quick menu | |
| uint32: 1 | bUsePlacementExtent | ||
| uint32: 1 | bUseSurfaceOrientation | ||
| FText | DisplayName | Name used as basis for 'New Actor' menu. | |
| int32 | MenuPriority | Indicates how far up the menu item should be. The higher the number, the higher up the list. | |
| TSubclassOf< AActor > | NewActorClass | AActor subclass this ActorFactory creates. | |
| FString | NewActorClassName | Name of actor subclass this actorfactory creates - dynamically loaded. Overrides NewActorClass. | |
| FVector | SpawnPositionOffset | Translation applied to the spawn position. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UActorFactory
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FQuat | AlignObjectToSurfaceNormal
(
const FVector& InSurfaceNormal, |
Return a quaternion which aligns this actor type to the specified surface normal | |
| bool | CanCreateActorFrom
(
const FAssetData& AssetData, |
||
| AActor * | CreateActor
(
UObject* InAsset, |
||
| void | CreateBrushForVolumeActor
(
AVolume* NewActor, |
||
| UObject * | GetAssetFromActorInstance
(
AActor* ActorInstance |
Given an instance of an actor, find the wrapped asset object which can be used to create a valid FAssetData. | |
| AActor * | GetDefaultActor
(
const FAssetData& AssetData |
Initialize NewActorClass if necessary, and return default actor for that class. | |
| UClass * | GetDefaultActorClass
(
const FAssetData& AssetData |
Initialize NewActorClass if necessary, and return that class. | |
| FString | GetDefaultActorLabel
(
UObject* Asset |
Get the default label that should be used for the actor spawned by the given asset (does not include any numeric suffix). | |
| FText | Name to put on context menu. | ||
| void | PostCreateBlueprint
(
UObject* Asset, |
Override this in derived factory classes if needed. | |
| void | PostSpawnActor
(
UObject* Asset, |
Subclasses may implement this to modify the actor after it has been spawned IMPORTANT: If you override this, you should usually also override PostCreateBlueprint()! | |
| bool | PreSpawnActor
(
UObject* Asset, |
||
| AActor * | SpawnActor
(
UObject* InAsset, |
||
| ULevel * | ValidateSpawnActorLevel
(
ULevel* InLevel, |
Validates the input params for SpawnActor and returns the appropriate level to use depending on whether InLevel and/or InSpawnParams.OverrideLevel is passed : |
Overridden from IAssetFactoryInterface
| Type | Name | Description | |
|---|---|---|---|
| void | BeginPlacement
(
const FPlacementOptions& InPlacementOptions |
Sets up any states that the factory needs to track across a placement call. | |
| bool | CanPlaceElementsFromAssetData
(
const FAssetData& InAssetData |
Given an FAssetData, determine if this asset factory can place any elements. | |
| void | EndPlacement
(
TArrayView< const FTypedElementHandle > InPlacedElements, |
Tears down any state, or kicks off any rebuilds of data that this asset type may need. | |
| UInstancedPlacemenClientSettings * | FactorySettingsObjectForPlacement
(
const FAssetData& InAssetData, |
Returns the settings object which this factory will use to customize placement settings, based on the given placement information. | |
| FAssetData | GetAssetDataFromElementHandle
(
const FTypedElementHandle& InHandle |
Given an FTypedElementHandle, attempt to resolve the handle to the FAssetData which may have placed it. | |
| TArray< FTypedElementHandle > | PlaceAsset
(
const FAssetPlacementInfo& InPlacementInfo, |
Places the asset. | |
| void | PostPlaceAsset
(
TArrayView< const FTypedElementHandle > InHandle, |
Finalizes any placed elements based on adjustments the factory may need to do. | |
| bool | PrePlaceAsset
(
FAssetPlacementInfo& InPlacementInfo, |
Performs any final tweaking of the PlacementInfo that the asset factory may need to do. |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| AActor * | CreateActor
(
UObject* Asset, |
This function has been deprecated in favor of the other version that takes a FActorSpawnParameters in parameter | |
| UBlueprint * | CreateBlueprint
(
UObject* Instance, |
This function is no longer used. See FKismetEditorUtilities::CreateBlueprint. | |
| AActor * | SpawnActor
(
UObject* Asset, |
This function has been deprecated in favor of the other version that takes a FActorSpawnParameters in parameter |