Hi guys,
In editor plugin module, I create many temporary UTexture2D object, when I save them to disk, did I need to delete them?
is this code correct?
UTexture2D* tmpTex = UTexture2D::CreateTransient(size, size);
// fill tex
DSUtility::FillTex2D(tmpTex, FColor::Black);
FString path = CosmosGenCfg::DefaultAssetPath;
assetName = TEXT("Neblua_");
// save to new content asset
DSEditorUtility::CreateTexture2DAsset(tmpTex, path, assetName);
// no need this tmpText, how can I destroy it?
// is this correct?
if (tmpTex && tmpTex->IsValidLowLevel())
tmpTex = nullptr;