Navigation
API > API/Runtime > API/Runtime/InterchangeCore
Asset factory implementation:
The first three steps use the Interchange factory node to import or reimport the UObject:
BeginImportAsset_GameThread - Create the asset UObject. You can also import source data (retrieve payloads) and set up properties on the game thread.
ImportAsset_Async - Import source data (retrieve payloads) and set up properties asynchronously on any thread.
EndImportAsset_GameThread - Anything you need to do on the game thread to finalize the import source data and set up properties. For example, conflict resolution that needs UI.
The last three steps can modify the created UObject
SetupObject_GameThread - Do any UObject setup required before the build, the UObject dependencies should exist and have all the source data and properties imported.
BuildObject_GameThread - Build the asset if it can be built.
FinalizeObject_GameThread - Do any final UObject setup after the build. Note that the build of an asset can be asynchronous and this function will be call after the async build is done.
Scene factory implementation:
ImportSceneObject_GameThread - Create an actor in a level.
| Name | UInterchangeFactoryBase |
| Type | class |
| Header File | /Engine/Source/Runtime/Interchange/Core/Public/InterchangeFactoryBase.h |
| Include Path | #include "InterchangeFactoryBase.h" |
Syntax
UCLASS (BlueprintType, Blueprintable, Abstract, MinimalAPI)
class UInterchangeFactoryBase : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UInterchangeFactoryBase
Derived Classes
UInterchangeFactoryBase derived class hierarchy
- UInterchangeActorFactory
- UInterchangeAnimSequenceFactory
- UInterchangeAudioSoundWaveFactory
- UInterchangeGeometryCacheFactory
- UInterchangeGroomCacheFactory
- UInterchangeGroomFactory
- UInterchangeLevelFactory
- UInterchangeLevelSequenceFactory
- UInterchangeMaterialFactory
- UInterchangeMaterialFunctionFactory
- UInterchangePhysicsAssetFactory
- UInterchangeSceneImportAssetFactory
- UInterchangeSceneVariantSetsFactory
- UInterchangeSkeletalMeshFactory
- UInterchangeSkeletonFactory
- UInterchangeSparseVolumeTextureFactory
- UInterchangeSpecularProfileFactory
- UInterchangeStaticMeshFactory
- UInterchangeTextureFactory
Structs
| Name | Remarks |
|---|---|
| FImportAssetObjectParams | Parameters to pass to the CreateAsset function. |
| FImportAssetResult | |
| FImportSceneObjectsParams | Parameters to pass to the SpawnActor function. |
| FSetupObjectParams | Parameters to pass to the CreateAsset function. |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Results | TObjectPtr< UInterchangeResultsContainer > | InterchangeFactoryBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddMessage
(
UInterchangeResult* Item |
InterchangeFactoryBase.h | ||
T * AddMessage () |
This function is used to add the given message object directly into the results for this operation. | InterchangeFactoryBase.h | |
virtual void BackupSourceData
(
const UObject* Object |
Backups SourceData from the AssetData. | InterchangeFactoryBase.h | |
virtual FImportAssetResult BeginImportAsset_GameThread
(
const FImportAssetObjectParams& Arguments |
Override this function to import/reimport source data and configure the properties synchronously. | InterchangeFactoryBase.h | |
virtual void BuildObject_GameThread
(
const FSetupObjectParams& Arguments, |
Build the asset if it can be built. | InterchangeFactoryBase.h | |
virtual void Cancel() |
Call when the user cancels the operation. | InterchangeFactoryBase.h | |
virtual void ClearBackupSourceData
(
const UObject* Object |
Clears the backedup SourceData from the Backup to the AssetData. | InterchangeFactoryBase.h | |
virtual void CreatePayloadTasks
(
const FImportAssetObjectParams& Arguments, |
InterchangeFactoryBase.h | ||
virtual FImportAssetResult EndImportAsset_GameThread
(
const FImportAssetObjectParams& Arguments |
Override this function to end import/reimport on the game thread. | InterchangeFactoryBase.h | |
virtual void FinalizeObject_GameThread
(
const FSetupObjectParams& Arguments |
Do any final UObject setup after the asset is built | InterchangeFactoryBase.h | |
virtual EInterchangeFactoryAssetType GetFactoryAssetType() |
Return the asset type this factory can create. | InterchangeFactoryBase.h |
|
virtual UClass * GetFactoryClass() |
Return the UClass this factory can create. | InterchangeFactoryBase.h |
|
virtual UObject * GetObjectToReimport
(
UObject* ReimportObject, |
Acquires the Object to be re-imported. | InterchangeFactoryBase.h | |
virtual bool GetSourceFilenames
(
const UObject* Object, |
Fills the OutSourceFilenames array with the list of source files contained in the asset source data. | InterchangeFactoryBase.h |
|
virtual FImportAssetResult ImportAsset_Async
(
const FImportAssetObjectParams& Arguments |
Override this function to import/reimport the UObject source data and configure the properties asynchronously. | InterchangeFactoryBase.h | |
virtual UObject * ImportAssetObject_Async
(
const FImportAssetObjectParams& Arguments |
InterchangeFactoryBase.h | ||
virtual UObject * ImportAssetObject_GameThread
(
const FImportAssetObjectParams& Arguments |
InterchangeFactoryBase.h | ||
virtual UObject * ImportSceneObject_GameThread
(
const FImportSceneObjectsParams& Arguments |
Creates the scene object from a Scene Node data. | InterchangeFactoryBase.h | |
void PostResetObjectProperties
(
const UInterchangeBaseNodeContainer* BaseNodeContainer, |
Called after resetting object properties. Useful for doing any cleanup required. | InterchangeFactoryBase.h | |
void PreResetObjectProperties
(
const UInterchangeBaseNodeContainer* BaseNodeContainer, |
Called before resetting object properties. Restores all the tracked custom attribute delegates. | InterchangeFactoryBase.h | |
virtual void ReinstateSourceData
(
const UObject* Object |
Reinstates the backedup SourceData from the Backup to the AssetData. | InterchangeFactoryBase.h | |
void ResetObjectProperties
(
const UInterchangeBaseNodeContainer* BaseNodeContainer, |
Re-apply all the custom attributes that were set on the Factory Node to the Object. | InterchangeFactoryBase.h | |
virtual bool SetReimportSourceIndex
(
const UObject* Object, |
Set the object's reimport source at the specified index value. | InterchangeFactoryBase.h | |
void SetResultsContainer
(
UInterchangeResultsContainer* InResults |
InterchangeFactoryBase.h | ||
| Sets the object's source at the specified index to the given SourceFileName. | InterchangeFactoryBase.h |
|
|
virtual void SetupObject_GameThread
(
const FSetupObjectParams& Arguments |
Do any UObject setup required before the build and after all dependency UObjects have been imported. | InterchangeFactoryBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ExecutePostResetObjectProperties
(
const UInterchangeBaseNodeContainer* BaseNodeContainer, |
Override this method in the child classes, to support custom behavior for PostResetObjectProperties | InterchangeFactoryBase.h | |
virtual void ExecutePreResetObjectProperties
(
const UInterchangeBaseNodeContainer* BaseNodeContainer, |
Override this method in the child classes, to support custom behavior for PreResetObjectProperties | InterchangeFactoryBase.h | |
virtual void ExecuteResetObjectProperties
(
const UInterchangeBaseNodeContainer* BaseNodeContainer, |
Override this method in the child classes if the Custom Attributes are not directly applied to the imported object E.g. | InterchangeFactoryBase.h |