ArticyXImporter
ArticyXImporter for Unreal Engine
Loading...
Searching...
No Matches
ArticyImporterHelpers Namespace Reference

Provides utility functions for importing and managing Articy assets in Unreal Engine. More...

Classes

struct  FCompareArticyNodeXLocation
 Comparator for sorting Articy nodes based on their X position. More...

Functions

UPackage * FindOrCreatePackage (const FString &Name)
 Finds or creates a package with the specified name.
UClass * RetrieveClass (const FString &ClassName, const FString &ModuleName="", UClass *BaseClass=UArticyObject::StaticClass())
 Retrieves a class by name, optionally within a specified module.
template<typename AssetType>
AssetType * GenerateAsset (const TCHAR *ClassName, const TCHAR *ModuleName, const FString AssetName="", const FString SubFolder="", const EObjectFlags AdditionalFlags=RF_NoFlags, bool MustCreate=false)
 Generates an asset of the specified type.
template<typename AssetType>
AssetType * GenerateSubAsset (const TCHAR *ClassName, const TCHAR *ModuleName, const FString AssetName="", UObject *Outer=nullptr)
 Generates a sub-asset of the specified type.

Detailed Description

Provides utility functions for importing and managing Articy assets in Unreal Engine.

This namespace contains helper functions and utilities to facilitate the creation, retrieval, and management of Articy assets within the Unreal Engine editor environment.

Function Documentation

◆ FindOrCreatePackage()

UPackage * ArticyImporterHelpers::FindOrCreatePackage ( const FString & Name)
inline

Finds or creates a package with the specified name.

This function attempts to find an existing package with the given name. If it doesn't exist, it creates a new package. The package is then fully loaded.

Parameters
NameThe name of the package to find or create.
Returns
A pointer to the found or created package.

◆ GenerateAsset()

template<typename AssetType>
AssetType * ArticyImporterHelpers::GenerateAsset ( const TCHAR * ClassName,
const TCHAR * ModuleName,
const FString AssetName = "",
const FString SubFolder = "",
const EObjectFlags AdditionalFlags = RF_NoFlags,
bool MustCreate = false )

Generates an asset of the specified type.

This template function generates an asset of the specified type, using the provided class and module names. It can optionally create a new asset if it doesn't already exist.

Template Parameters
AssetTypeThe type of asset to generate.
Parameters
ClassNameThe name of the class for the asset.
ModuleNameThe module name where the class is defined.
AssetNameThe optional name of the asset to generate.
SubFolderThe optional subfolder where the asset will be created.
AdditionalFlagsOptional additional object flags for the asset.
MustCreateWhether the asset must be newly created (if true).
Returns
A pointer to the generated asset, or nullptr on failure.

◆ GenerateSubAsset()

template<typename AssetType>
AssetType * ArticyImporterHelpers::GenerateSubAsset ( const TCHAR * ClassName,
const TCHAR * ModuleName,
const FString AssetName = "",
UObject * Outer = nullptr )

Generates a sub-asset of the specified type.

This template function generates a sub-asset of the specified type, using the provided class and module names. The sub-asset is created within the specified outer object.

Template Parameters
AssetTypeThe type of sub-asset to generate.
Parameters
ClassNameThe name of the class for the sub-asset.
ModuleNameThe module name where the class is defined.
AssetNameThe optional name of the sub-asset to generate.
OuterThe outer object that will own the sub-asset.
Returns
A pointer to the generated sub-asset, or nullptr on failure.

◆ RetrieveClass()

UClass * ArticyImporterHelpers::RetrieveClass ( const FString & ClassName,
const FString & ModuleName = "",
UClass * BaseClass = UArticyObject::StaticClass() )
inline

Retrieves a class by name, optionally within a specified module.

This function looks up a class by name, searching within the specified module if provided. If no module is specified, it searches within the "ArticyRuntime" and project-generated classes.

Parameters
ClassNameThe name of the class to retrieve.
ModuleNameThe optional module name to search within.
BaseClassThe base class to use for the search.
Returns
A pointer to the found class, or nullptr if not found.