Add printing output C# files size in game cooker

This commit is contained in:
Wojtek Figat
2023-04-03 18:26:17 +02:00
parent bb84a51478
commit be7da82cfc

View File

@@ -2,9 +2,20 @@
#include "PostProcessStep.h"
#include "Editor/Cooker/PlatformTools.h"
#include "Engine/Platform/FileSystem.h"
bool PostProcessStep::Perform(CookingData& data)
{
// Print .NET stats
const DotNetAOTModes aotMode = data.Tools->UseAOT();
uint64 outputSize = FileSystem::GetDirectorySize(data.DataOutputPath / TEXT("Dotnet"));
if (aotMode == DotNetAOTModes::None)
{
for (auto& binaryModule : data.BinaryModules)
outputSize += FileSystem::GetFileSize(data.DataOutputPath / binaryModule.ManagedPath);
}
LOG(Info, "Output .NET files size: {0} MB", (uint32)(outputSize / (1024ull * 1024)));
GameCooker::PostProcessFiles();
return data.Tools->OnPostProcess(data);
}