We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
复现条件:
配置多chunk 打patch
勾选Create Default Chunk后
执行Patch操作, 结果: 有些差分出来的资源,没进任何pak, DefaultPak里面也没有.但是Diff.json里面是有的 原因: 没进入的资源是因为 这些资源不符合任何Chunk的IncludeFileFilters, 但却被其他资源引用到了. 假设符合上面条件的资源为:B.asset 在执行PatcherProxy.ParserChunkWorker 里面的 FChunkAssetDescribe ChunkDiffInfo = UFlibHotPatcherCoreHelper::DiffChunkWithPatchSetting( Context.GetSettingObject(), Context.NewVersionChunk, TotalChunk ); 方法里 会将B.asset 排除掉,导致后面的逻辑都不在有B.asset的处理了。 解决方法: 修改: UFlibHotPatcherCoreHelper::DiffChunkWithPatchSetting方法为: FChunkAssetDescribe UFlibHotPatcherCoreHelper::DiffChunkWithPatchSetting( const FExportPatchSettings& PatchSetting, const FChunkInfo& CurrentVersionChunk, const FChunkInfo& TotalChunk //,TMap<FString, FAssetDependenciesInfo>& ScanedCaches ) { FHotPatcherVersion TotalChunkVersion = UFlibPatchParserHelper::ExportReleaseVersionInfoByChunk( TEXT(""), TEXT(""), TEXT(""), TotalChunk, //ScanedCaches, PatchSetting.IsIncludeHasRefAssetsOnly(), TotalChunk.bAnalysisFilterDependencies ); //排除掉 TotalChunkVersion 里面不属于任何ChunkInfo的资源 /by ssg start*/ auto IsRemove = [&TotalChunkVersion](FString &assetName)->bool { for(auto filter:TotalChunkVersion.IncludeFilter) { filter = UFlibAssetManageHelper::NormalizeContentDir(filter); if(assetName.Find(filter) >= 0) { return false; } } for(auto specifyAsset:TotalChunkVersion.IncludeSpecifyAssets) { FString p = specifyAsset.Asset.GetLongPackageName(); if(p == assetName) { return false; } } return true; }; TMap<FString,FAssetDetail>& assets = TotalChunkVersion.AssetInfo.AssetsDependenciesMap["Game"].AssetDependencyDetails; TArray keys; assets.GetKeys(keys); for(auto item:keys) { if(IsRemove(item)) { assets.Remove(item); } } /by ssg end**/
return UFlibHotPatcherCoreHelper::DiffChunkByBaseVersionWithPatchSetting(PatchSetting, CurrentVersionChunk ,TotalChunk, TotalChunkVersion/,ScanedCaches/); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
复现条件:
配置多chunk 打patch
勾选Create Default Chunk后
执行Patch操作,
结果: 有些差分出来的资源,没进任何pak, DefaultPak里面也没有.但是Diff.json里面是有的
原因:
没进入的资源是因为 这些资源不符合任何Chunk的IncludeFileFilters, 但却被其他资源引用到了.
假设符合上面条件的资源为:B.asset
在执行PatcherProxy.ParserChunkWorker 里面的
FChunkAssetDescribe ChunkDiffInfo = UFlibHotPatcherCoreHelper::DiffChunkWithPatchSetting(
Context.GetSettingObject(),
Context.NewVersionChunk,
TotalChunk
);
方法里 会将B.asset 排除掉,导致后面的逻辑都不在有B.asset的处理了。
解决方法:
修改:
UFlibHotPatcherCoreHelper::DiffChunkWithPatchSetting方法为:
FChunkAssetDescribe UFlibHotPatcherCoreHelper::DiffChunkWithPatchSetting(
const FExportPatchSettings& PatchSetting,
const FChunkInfo& CurrentVersionChunk,
const FChunkInfo& TotalChunk
//,TMap<FString, FAssetDependenciesInfo>& ScanedCaches
)
{
FHotPatcherVersion TotalChunkVersion = UFlibPatchParserHelper::ExportReleaseVersionInfoByChunk(
TEXT(""),
TEXT(""),
TEXT(""),
TotalChunk,
//ScanedCaches,
PatchSetting.IsIncludeHasRefAssetsOnly(),
TotalChunk.bAnalysisFilterDependencies
);
//排除掉 TotalChunkVersion 里面不属于任何ChunkInfo的资源
/by ssg start*/
auto IsRemove = [&TotalChunkVersion](FString &assetName)->bool
{
for(auto filter:TotalChunkVersion.IncludeFilter)
{
filter = UFlibAssetManageHelper::NormalizeContentDir(filter);
if(assetName.Find(filter) >= 0)
{
return false;
}
}
for(auto specifyAsset:TotalChunkVersion.IncludeSpecifyAssets)
{
FString p = specifyAsset.Asset.GetLongPackageName();
if(p == assetName)
{
return false;
}
}
return true;
};
TMap<FString,FAssetDetail>& assets = TotalChunkVersion.AssetInfo.AssetsDependenciesMap["Game"].AssetDependencyDetails;
TArray keys;
assets.GetKeys(keys);
for(auto item:keys)
{
if(IsRemove(item))
{
assets.Remove(item);
}
}
/by ssg end**/
return UFlibHotPatcherCoreHelper::DiffChunkByBaseVersionWithPatchSetting(PatchSetting, CurrentVersionChunk ,TotalChunk, TotalChunkVersion/,ScanedCaches/);
}
The text was updated successfully, but these errors were encountered: