seems there is a bug when load a level with ULevel::LoadAllExternalObjectsTag
if I want to load a wp level with all actors in level, I could use the code:
FLinkerInstancingContext InstancingContext(
);
UObject* LevelObject = LoadObject<UObject>(nullptr, *ObjectPath, nullptr, LOAD_None, nullptr, &InstancingContext);
then LevelObject is a ULevel and all actors in wp level are loaded, it is ok if this level is the first load but some time the level have loaded then use the code to get the level will get the package in memory then the LevelObject will not contain all actors in level
for example if I use a property to let the user choose which level to load, when click the button (in picture11), SPropertyEditorAsset::OnUse will call FContentBrowserSingleton::OnEditorLoadSelectedAssetsIfNeeded then load the level already , then I use a cusom function to get the level property path to load this level (picture2), then use ULevel::LoadAllExternalObjectsTag to load the level could not get all actors
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-218688 in the post.
0 |
Component | UE - World Creation - Worldbuilding Tools |
---|---|
Affects Versions | 5.4 |
Target Fix | 5.5 |
Created | Jun 25, 2024 |
---|---|
Updated | Jul 17, 2024 |