hxhb / HotPatcher

Unreal Engine hot update manage and package plugin.
https://imzlp.com/posts/17590/
MIT License
1.22k stars 329 forks source link

Fix compile for UE5.4 #104

Closed TroutZhang closed 2 weeks ago

TroutZhang commented 4 months ago

已经尽量分拆改动原子提交到每个submit里了。

TroutZhang commented 4 months ago
#if UE_VERSION_OLDER_THAN(5,4,0)
    FArchiveCookContext ArchiveCookContext(Package, FArchiveCookContext::ECookType::ECookByTheBook, FArchiveCookContext::ECookingDLC::ECookingDLCNo);
#else
    FArchiveCookContext ArchiveCookContext(Package, UE::Cook::ECookType::ByTheBook, UE::Cook::ECookingDLC::No);
#endif

这个改动,其实只去掉中间的namespace也可以编过(如下代码),我看到的depreacated,就顺便改成最新的了。

FArchiveCookContext ArchiveCookContext(Package, FArchiveCookContext::ECookByTheBook, FArchiveCookContext::ECookingDLCNo);

TroutZhang commented 4 months ago

我昨天升级的ue5.4,然后今天整理的PR (我本地的改动没有#if UE_VERSION_OLDER_THAN(5,4,0)

onlyhan commented 2 months ago

HotPatcherPackageWriter 类需要加入 #include "AssetRegistry/AssetRegistryState.h", 解决LoadPreviousAssetRegistry函数报“指向不完整,没有调用析构函数”