When working on a level asset and using command "File – Save Current Level As..." to save it over a different level asset, the engine first deletes the target level (that's going to be overwritten) and then proceeds to save and reopen the current level with the target filename.
If Perforce version control integration is enabled, the deletion of the old level triggers the following commands:
LogSourceControl: Attempting 'p4 fstat -Or <PROJECT>/<TARGETMAP>.umap'
LogSourceControl: Attempting 'p4 revert -w <PROJECT>/<TARGETMAP>.umap'
LogSourceControl: Attempting 'p4 delete <PROJECT>/<TARGETMAP>.umap'
Afterwards, the attempt to save the current level with the same file name triggers the following commands and warnings:
LogSourceControl: Attempting 'p4 add <PROJECT>/<TARGETMAP>.umap'
SourceControl: CommandMessage Command: MarkForAdd, Info: <TARGETMAP>.umap - can't add (already opened for delete)
SourceControl: CommandMessage Command: MarkForAdd, Info: <TARGETMAP>.umap - warning: add of existing file
As a result, the target level is successfully overwritten, but the source control state of the target umap file is incorrectly left as "marked for delete".
Notes:
1. The behavior is the same regardless of the level types involved (basic, basic with external actors, world partition).
2. When using external actors, the resulting state of the actor files seems to be correct. Only the level file itself is affected.
3. The problem does not seem to happen when saving an unsaved in-memory level that has just been created.
4. If the target level is not checked-out but is writable, perforce remains completely unaware of the change (the level file is changed but it is not checked out or marked as modified).
1. Create or open a project under Perforce and enable the in-engine Perforce integration.
2. Create, save and check-in a map LevelA.umap
3. Create, save and check-in a map LevelB.umap
4. Check-out LevelB so that it can be overwritten (right-click the asset – Revision Control – Check Out)
5. Open LevelA
6. Go to "File – Save Current Level As..." and select LevelB.umap
7. Confirm the overwrite
8. Bug: LevelB is correctly overwritten, but is left as "marked for delete" in Perforce.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-254880 in the post.
0 |
Component | UE - Editor - Workflow Systems |
---|---|
Affects Versions | 5.4 |
Created | Mar 11, 2025 |
---|---|
Updated | Mar 28, 2025 |