when I try to use AssetRegistry.GetAssets, it seems missing some assset.
The missing asset is /Engine/ArtTools/RenderToTexture/Blueprints/PhysMesh
The first time I start the Engine, it always miss. While I double click open this asset, it would reappear in the result.
Is it normal? or there is some optimization to turn off or option can prevent it?
AssetRegistry.GetAssets
the code may look likes below
FARFilter BPFilter;
BPFilter.PackagePaths.Add(FName(TEXT("/Engine")));
BPFilter.bRecursivePaths = true;
BPFilter.bRecursiveClasses = true;
BPFilter.ClassPaths.Add(UUserDefinedStruct::StaticClass()->GetClassPathName());
TArray<FAssetData> AssetList;
AssetRegistry.GetAssets(BPFilter, AssetList);
And maybe there is a easier way to recognize this problem.
Just use filers in Editor ConterBrowser, set the filter to only Structure, and you would not see the PhysMesh asset.
But if you open that asset, now you can see it after filter
I was build the Engine from source code, so I track the code and found seems FAssetRegistryState.CachedAssetsByClass miss some asset.
I use AssetRegistry.DumpState -log PackageName Class to dump data, one before I open PhysMesh asset, the other is after I open it.