IAssetTools::CreateAsset

Creates an asset with the specified name, path, and factory

Unreal Engine C++ API Reference > Developer > AssetTools > IAssetTools

References

   
Module AssetTools
Header /Engine/Source/Developer/AssetTools/Public/IAssetTools.h
Include #include "IAssetTools.h"
[UObject](API\Runtime\CoreUObject\UObject\UObject) * CreateAsset
(
    const [FString](API\Runtime\Core\Containers\FString) & AssetName,
    const [FString](API\Runtime\Core\Containers\FString) & PackagePath,
    [UClass](API\Runtime\CoreUObject\UObject\UClass) * AssetClass,
    [UFactory](API\Editor\UnrealEd\Factories\UFactory) * Factory,
    [FName](API\Runtime\Core\UObject\FName) CallingContext
)

Remarks

Creates an asset with the specified name, path, and factory the new asset or NULL if it fails

Parameters

Name Description
AssetName the name of the new asset
PackagePath the package that will contain the new asset
AssetClass the class of the new asset
Factory the factory that will build the new asset
CallingContext optional name of the module or method calling CreateAsset() - this is passed to the factory

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library