If a level is referenced by the current level as a streaming level, and then you load it directly as the main level, it does not get garbage-collected during the load.
Steps to Reproduce
- Create a level with a static mesh actor. Save it. (or use an existing level)
- Create a new level, and add the first level as a streaming level within this new base map (or use an existing level that references the first level in this way).
- Rotate the static mesh actor in the first level by 90 degrees.
- From File->Recent Levels, load the first level directly. When prompted, do NOT save anything.
- (If running with a debugger attached, you can place a memory breakpoint on the actor to see that the breakpoint is never hit, thus the memory was never garbage-collected.)
- Notice that the actor retains the rotation, even though you never saved anything.
- Reload the level from the File menu, and notice that the rotation is now gone.
- Also notice that you were never prompted to save the level upon reloading it (which would be correct if the actor were not rotated, but could lead to lost work if a user doesn’t notice.)
Hi Dan,
Thank you for the report and clear repro steps, I was able to repro this on all UE versions from 5.3 to latest source. I’m preparing an internal bug report for this issue, but I’d like to check a little detail with you first. In my tests, occasionally the problem would not happen on the very first time after creating both levels, setting one as a sublevel of the other, saving both, and then attempting the “rotation + reload sub level”. It would then happen on all following attempts. And on every time the problem did happen, I did actually get a second prompt to save the sublevel upon reloading it the second time. Can you please verify if the behavior on your side matches this? If it is different, would it be possible for you to check if the provided repro steps are exactly the steps you are performing?
Best regards,
Vitor
Hi, sorry for the delayed reply. Things have been busy.
1) I am finding that it does sometimes prompt me to save the sublevel when loading the sublevel directly while the referencing map is the currently-loaded persistent. It seems inconsistent, and I’m not sure of the exact circumstances.
2) Upon checking again today, it is prompting me to save the sublevel when reloading it. This behavior also is different from my memory when I first reported the issue.
3) The behavior of not unloaded the sublevel (such that the actor is still rotated) has happened with every attempt so far.
Hi Dan,
No problem, and thank you for the additional tests and information. I have filed the bug report, here’s the tracking number: UE-364688. This link should become available once the engine devs mark it as public.
So far I was also not able to determine what circumstances can make the Editor behave one way or the other. I’ll test a little more, but otherwise let’s hope the devs can figure it out. If at any point you think you have any extra information, feel free to add it here as well!
Best regards,
Vitor