AssetGenerationUtil::SaveGeneratedTexture2D

Save generated [UTexture2D](API\Runtime\Engine\Engine\UTexture2D) that is currently in the Transient package (ie generated in code) as an Asset with a given name

Windows
MacOS
Linux

References

Module

ModelingComponents

Header

/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingComponents/Public/AssetGenerationUtil.h

Include

#include "AssetGenerationUtil.h"

Source

/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingComponents/Private/AssetGenerationUtil.cpp

Syntax

namespace AssetGenerationUtil
{
    bool AssetGenerationUtil::SaveGeneratedTexture2D
    (
        IToolsContextAssetAPI * AssetAPI,
        UTexture2D * TransientTexture,
        FString ObjectName,
        const UObject * RelativeToAsset
    )
}

Remarks

Save generated UTexture2D that is currently in the Transient package (ie generated in code) as an Asset with a given name

Parameters

Parameter

Description

AssetAPI

pointer to context asset API that will be used to create new asset

TransientTexture

texture to save

ObjectName

name of the new asset

RelativeToAsset

New texture will be saved at the same path as the UPackage for this UObject, which we assume to be an Asset (eg like a UStaticMesh)

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