Files
UnrealEngineUWP/Engine/Source/Developer/AssetTools/Private/AssetHeaderPatcher.h
andrew phillips ecd7677c49 Advanced copy using header patching as an option
Advanced copy, builds a list of depended assets, builds patching rules, and calls the AssetHeaderPatcher.
use `-ini:Engine:[ConsoleVariables]:AssetTools.UseHeaderPatchingAdvancedCopy=true` as cli option


#ushell-cherrypick of 28492015 by andrew.phillips

[CL 29144603 by andrew phillips in ue5-main branch]
2023-10-26 14:54:24 -04:00

32 lines
834 B
C

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Tasks/Task.h"
#include "Containers/ContainersFwd.h"
struct FAssetHeaderPatcher
{
enum class EResult
{
Success,
ErrorFailedToLoadSourceAsset,
ErrorFailedToDeserializeSourceAsset,
ErrorUnexpectedSectionOrder,
ErrorBadOffset,
ErrorUnkownSection,
ErrorFailedToOpenDestinationFile,
ErrorFailedToWriteToDestinationFile,
ErrorEmptyRequireSection,
};
static UE::Tasks::TTask<EResult> Start(FString InSrcAsset, FString InDstAsset,
TMap<FString, FString> InSearchAndReplace);
static UE::Tasks::TTask<EResult> Start(TUniquePtr<FArchive> InSrcReader, FString InDstAsset,
TMap<FString, FString> InSearchAndReplace);
static EResult Test_DoPatch(FArchive& InSrcReader, FArchive& InDstWriter,
TMap<FString, FString> InSearchAndReplace);
};