UFactory

Base class for all factories An object responsible for creating and importing new objects.

Windows
MacOS
Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UFactory

PAPER2UPaperFlipbookFactory

UAlembicImportFactory

UAnimationSharingSetupFactory

UAnimBlueprintFactory

UAnimLayerInterfaceFactory

UAnimBoneCompressionSettingsFactory

UAnimCompositeFactory

UAnimCurveCompressionSettingsFactory

UAnimMontageFactory

UAnimSequenceFactory

UAnimStreamableFactory

UAudioBusFactory

UAudioImpulseResponseFactory

UAudioSynesthesiaNRTFactory

UAudioSynesthesiaNRTSettingsFactory

UBehaviorTreeFactory

UBlackboardDataFactory

UBlendSpaceFactory1D

UAimOffsetBlendSpaceFactory1D

UBlendSpaceFactoryNew

UAimOffsetBlendSpaceFactoryNew

UBlueprintFactory

UBlueprintFunctionLibraryFactory

UBlueprintMacroFactory

UBlueprintInterfaceFactory

UCacheCollectionFactory

UCameraAnimFactory

UCanvasRenderTarget2DFactoryNew

UChaosPhysicalMaterialFactory

UChaosSolverFactory

UCompositeCurveTableFactory

UCSVImportFactory

UReimportCurveFactory

UReimportCurveTableFactory

UReimportDataTableFactory

UCurveFactory

UCurveFloatFactory

UCurveLinearColorFactory

UCurveVectorFactory

UCurveImportFactory

UCurveLinearColorAtlasFactory

UDataAssetFactory

UDataprepAssetFactory

UDataprepAssetInstanceFactory

UDataTableFactory

UCompositeDataTableFactory

UDialogueVoiceFactory

UDialogueWaveFactory

UDMXEditorFactoryNew

UDNAAssetImportFactory

UEditorUtilityBlueprintFactory

UEditorUtilityWidgetBlueprintFactory

UEndpointSubmixFactory

UEnumFactory

UEnvironmentQueryFactory

UFbxFactory

UReimportFbxAnimSequenceFactory

UReimportFbxSkeletalMeshFactory

UReimportFbxStaticMeshFactory

UFieldSystemFactory

UFontFactory

UFontFileImportFactory

UForceFeedbackAttenuationFactory

UForceFeedbackEffectFactory

UGameplayAbilitiesBlueprintFactory

UGeometryCollectionCacheFactory

UGeometryCollectionFactory

UGroomBindingFactory

UGroomFactory

UHairStrandsFactory

UReimportGroomCacheFactory

UReimportHairStrandsFactory

UHapticFeedbackEffectBufferFactory

UHapticFeedbackEffectCurveFactory

UHapticFeedbackEffectSoundWaveFactory

UInputAction_Factory

UInputMappingContext_Factory

UInterpDataFactoryNew

UITDSpatializationSettingsFactory

ULevelFactory

ULightPropagationVolumeBlendableFactory

ULiveLinkBlueprintVirtualSubjectFactory

UMaterialFactoryNew

UMaterialFunctionFactoryNew

UMaterialFunctionInstanceFactory

UMaterialFunctionMaterialLayerBlendInstanceFactory

UMaterialFunctionMaterialLayerInstanceFactory

UMaterialFunctionMaterialLayerBlendFactory

UMaterialFunctionMaterialLayerFactory

UMaterialInstanceConstantFactoryNew

UMaterialParameterCollectionFactoryNew

UModelFactory

UModularSynthPresetBankFactory

UMonoWaveTableSynthPresetFactory

UNiagaraEffectTypeFactoryNew

UNiagaraEmitterFactoryNew

UNiagaraParameterCollectionFactoryNew

UNiagaraParameterCollectionInstanceFactoryNew

UNiagaraParameterDefinitionsFactory

UNiagaraScriptFactoryNew

UNiagaraDynamicInputScriptFactory

UNiagaraFunctionScriptFactory

UNiagaraModuleScriptFactory

UNiagaraSystemFactoryNew

UObjectLibraryFactory

UPackageFactory

UPackFactory

UPaperSpriteFactory

UPaperTiledImporterFactory

UPaperTileMapFactory

UPaperTileMapPromotionFactory

UPaperTileSetFactory

UParticleSystemFactoryNew

UPhysicalMaterialFactoryNew

UPhysicalMaterialMaskFactory

UPhysicsAssetFactory

UPolysFactory

UPoseAssetFactory

UPreviewMeshCollectionFactory

UReverbEffectFactory

URuntimeVirtualTextureFactory

USceneImportFactory

UDatasmithImportFactory

UFbxSceneImportFactory

UReimportFbxSceneFactory

USkeletonFactory

USlateBrushAssetFactory

USlateVectorArtDataFactory

USlateWidgetStyleAssetFactory

USoundAttenuationFactory

USoundClassFactory

USoundConcurrencyFactory

USoundCueFactoryNew

USoundCueTemplateCopyFactory

USoundCueTemplateFactory

USoundFactory

UReimportSoundFactory

USoundfieldEndpointSubmixFactory

USoundfieldSubmixFactory

USoundMixFactory

USoundModImporterFactory

USoundSourceBusFactory

USoundSourceEffectChainFactory

USoundSourceEffectFactory

USoundSubmixEffectFactory

USoundSubmixFactory

USpeedTreeImportFactory

UReimportSpeedTreeFactory

UStringTableFactory

UStructureFactory

USubsurfaceProfileFactory

USubUVAnimationFactory

UTexture2DArrayFactory

UTexture2DFactoryNew

UTextureFactory

UReimportTextureFactory

UTrueTypeFontFactory

UTextureRenderTarget2DArrayFactoryNew

UTextureRenderTargetCubeFactoryNew

UTextureRenderTargetFactoryNew

UTextureRenderTargetVolumeFactoryNew

UTimecodeSynchronizerFactory

UTimeSynthClipFactory

UTimeSynthVolumeGroupFactory

UTouchInterfaceFactory

UVariantManagerFactoryNew

UVCamModifierFactory

UVectorFieldStaticFactory

UReimportVectorFieldStaticFactory

UVirtualTextureBuilderFactory

UVolumeTextureFactory

UWidgetBlueprintFactory

UWorldFactory

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Classes/Factories/Factory.h

Include

#include "Factories/Factory.h"

Syntax

class UFactory : public UObject

Remarks

Base class for all factories An object responsible for creating and importing new objects.

Variables

Name Description

Protected variable

TArray< UObject...

 

AdditionalImportedObjects

Public variable

UAssetImportTas...

 

AssetImportTask

Task for importing file via script interfaces

Public variable

const UAutomate...

 

AutomatedImportData

Data for how to import files via the automated command line importing interface

Protected variable

uint32: 1

 

bCreateNew

The default value to return from CanCreateNew()

Public variable

uint32: 1

 

bEditAfterNew

True if the associated editor should be opened after creating a new object.

Public variable

uint32: 1

 

bEditorImport

True if the factory imports objects from files.

Public variable

uint32: 1

 

bText

True if the factory imports objects from text.

Public variable

TSubclassOf< UO...

 

ContextClass

Class of the context object used to help create the object.

Public variable

TArray< FString...

 

Formats

List of formats supported by the factory.

Public variable

int32

 

ImportPriority

Determines the order in which factories are tried when importing or reimporting an object.

Protected variable

int32

 

OverwriteYesOrNoToAllState

For interactive object imports, this value indicates whether the user wants objects to be automatically overwritten (See EAppReturnType), or -1 if the user should be prompted.

Public variable

TSubclassOf< UO...

 

SupportedClass

The class manufactured by this factory.

Constructors

Name Description

Public function

UFactory

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Public function Virtual Const

bool

 

CanCreateNew()

Public function Virtual Const

bool

 

CanImportBeCanceled()

Whether the factory is checking for SlowTask::ShouldCancel() while importing and aborting the import when appropriate.

Public function Virtual

void

 

CleanUp()

Do clean up after importing is done. Will be called once for multi batch import.

Public function Virtual

bool

 

ConfigureProperties()

Opens a dialog to configure the factory properties.

Public function Const

UObject *...

 

CreateOrOverwriteAsset

(
    UClass* InClass,
    UObject* InParent,
    FName InName,
    EObjectFlags InFlags,
    UObject* InTemplate
)

Creates an asset if it doesn't exist.

Public function

void

 

DisplayOverwriteOptionsDialog

(
    const FText& Message
)

Pop up message to the user asking whether they wish to overwrite existing state or not.

Public function Virtual

bool

 

DoesSupportClass

(
    UClass* Class
)

Public function Virtual

bool

 

FactoryCanImport

(
    const FString& Filename
)

Whether the specified file can be imported by this factory.

Protected function Virtual

UObject *...

 

FactoryCreateBinary

(
    UClass* InClass,
    UObject* InParent,
    FName InName,
    EObjectFlags Flags,
    UObject* Context,
    const TCHAR* Type,
    const uint8*& Buffer,
    const uint8* BufferEnd,
    FFeedbackContext* Warn,
    bool& bOutOperationCanceled
)

Create a new object by importing it from a binary buffer (cancelable).

Protected function Virtual

UObject *...

 

FactoryCreateBinary

(
    UClass* InClass,
    UObject* InParent,
    FName InName,
    EObjectFlags Flags,
    UObject* Context,
    const TCHAR* Type,
    const uint8*& Buffer,
    const uint8* BufferEnd,
    FFeedbackContext* Warn
)

Create a new object by importing it from a binary buffer.

Public function Virtual

UObject *...

 

FactoryCreateFile

(
    UClass* InClass,
    UObject* InParent,
    FName InName,
    EObjectFlags Flags,
    const FString& Filename,
    const TCHAR* Parms,
    FFeedbackContext* Warn,
    bool& bOutOperationCanceled
)

Create a new object by importing it from a file name.

Public function Virtual

UObject *...

 

FactoryCreateNew

(
    UClass* InClass,
    UObject* InParent,
    FName InName,
    EObjectFlags Flags,
    UObject* Context,
    FFeedbackContext* Warn
)

Create a new object by class.

Public function Virtual

UObject *...

 

FactoryCreateNew

(
    UClass* InClass,
    UObject* InParent,
    FName InName,
    EObjectFlags Flags,
    UObject* Context,
    FFeedbackContext* Warn,
    FName CallingContext
)

Create a new object by class.

Protected function Virtual

UObject *...

 

FactoryCreateText

(
    UClass* InClass,
    UObject* InParent,
    FName InName,
    EObjectFlags Flags,
    UObject* Context,
    const TCHAR* Type,
    const TCHAR*& Buffer,
    const TCHAR* BufferEnd,
    FFeedbackContext* Warn
)

Create a new object by importing it from a text buffer.

Protected function Virtual

UObject *...

 

FactoryCreateText

(
    UClass* InClass,
    UObject* InParent,
    FName InName,
    EObjectFlags Flags,
    UObject* Context,
    const TCHAR* Type,
    const TCHAR*& Buffer,
    const TCHAR* BufferEnd,
    FFeedbackContext* Warn,
    bool& bOutOperationCanceled
)

Create a new object by importing it from a text buffer.

Public function Const

const TArray...

 

GetAdditionalImportedObjects()

Returns an array of all the additional objects created during the last imports, as some factories may produce more than one object.

Public function Static

FString

 

GetCurrentFilename()

Get the name of the file currently being imported.

Public function Static

int32

 

GetDefaultImportPriority()

Get the default import priority for factories.

Public function Virtual Const

FString

 

GetDefaultNewAssetName()

Returns a new starting point name for newly created assets in the content browser

Public function Virtual Const

FText

 

GetDisplayName()

Returns the name of the factory for menus

Public function Static

FMD5Hash

 

GetFileHash()

Get the Hash for the file being imported.

Public function Virtual

IImportSetti...

 

GetImportSettingsParser()

Public function Virtual Const

uint32

 

GetMenuCategories()

When shown in menus, this is the category containing this factory.

Public function Virtual Const

const TArray...

 

GetMenuCategorySubMenus()

Branch of sub-menus containing factory under each provided category.

Public function Virtual Const

FName

 

GetNewAssetThumbnailOverride()

Returns an optional override brush name for the new asset menu.

Public function Const

UClass *

 

GetSupportedClass()

Public function Virtual Const

void

 

GetSupportedFileExtensions

(
    TArray< FString >& OutExtensions
)

Creates a list of file extensions supported by this factory

Public function Virtual Const

FText

 

GetToolTip()

Returns the tooltip text description of this factory

Public function Virtual Const

FString

 

GetToolTipDocumentationExcerpt()

Returns the documentation excerpt that should be use for the rich tool tip for this factory

Public function Virtual Const

FString

 

GetToolTipDocumentationPage()

Returns the documentation page that should be use for the rich tool tip for this factory

Public function Virtual

UObject *...

 

ImportObject

(
    UClass* InClass,
    UObject* InOuter,
    FName InName,
    EObjectFlags Flags,
    const FString& Filename,
    const TCHAR* Parms,
    bool& OutCanceled
)

Public function Virtual

bool

 

ImportUntypedBulkDataFromText

(
    const TCHAR*& Buffer,
    FUntypedBulkData& BulkData
)

Public function Virtual Const

bool

 

IsAutomatedImport()

Public function

void

 

ResetState()

Resets the saved state of this factory.

Public function Virtual

UClass *

 

ResolveSupportedClass()

Resolves SupportedClass for factories which support multiple classes.

Public function

bool

 

ScriptFactoryCanImport

(
    const FString& Filename
)

Whether the specified file can be imported by this factory. (Implemented in script)

Public function

bool

 

ScriptFactoryCreateFile

(
    UAssetImportTask* InTask
)

Import object(s) using a task via script

Public function

void

 

SetAssetImportTask

(
    UAssetImportTask* Task
)

Sets the import task being used with this factory

Public function

void

 

SetAutomatedAssetImportData

(
    const UAutomatedAssetImportData...
)

Sets the automated import data being used with this factory

Public function Virtual Const

bool

 

ShouldShowInNewMenu()

Returns true if this factory should be shown in the New Asset menu (by default calls CanCreateNew).

Public function Static

bool

 

SortFactoriesByPriority

(
    const UFactory& A,
    const UFactory& B
)

Helper function to sort an array of factories by their import priority - use as a predicate for Sort

Public function Static

UObject *...

 

StaticImportObject

(
    UClass* Class,
    UObject* InOuter,
    FName Name,
    EObjectFlags Flags,
    const TCHAR* Filename,
    UObject* Context,
    UFactory* Factory,
    const TCHAR* Parms,
    FFeedbackContext* Warn,
    int32 MaxImportFileSize
)

Public function Static

UObject *...

 

StaticImportObject

(
    UClass* Class,
    UObject* InOuter,
    FName Name,
    EObjectFlags Flags,
    bool& bOutOperationCanceled,
    const TCHAR* Filename,
    UObject* Context,
    UFactory* Factory,
    const TCHAR* Parms,
    FFeedbackContext* Warn,
    int32 MaxImportFileSize
)

Constants

Name

Description

CurrentFilename

Name of the file currently being imported.

DefaultImportPriority

This is the import priority that all factories are given in the default constructor.

FileHash

This is the HASH for the file being imported

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