FlaxEngine / FlaxEngine/FlaxEngine
[Bug]: Error and no undo when undoing deletion of actor after saving prefab
- Dominant language
- C++
- Stars
- 7k
- Forks
- 713
- Avg merge
- 7d 11h
- Merged PRs (30d)
- 19
Description
### Description
When:
1. Deleting an actor from a prefab
2. Saving the prefab
3. Trying to undo the deletion,
the deleted actor won't come back from the place where deleted actors go:
https://github.com/user-attachments/assets/64e1e1e7-ef7f-4ba6-912b-eaff95c0c7d8
The actor will come back and there won't be any error if you *don't* save the prefab between deletion and undo.
This can be a problem because saving often happens subconsciously, especially after "big" actions like deleting an actor. Also there is the possibility of auto save saving the prefab just after deleting an actor, which then would make it impossible to undo the deletion.
Depending on how many changes you made to the actors properties and its scripts, this can become a pain to redo manually.
### Steps to reproduce
see "Description".
### Version
master branch
### Relevant logs
```shell
[ 00:08:42.379 ]: Missing object b1699c204736c75ccf418e83356ed5d3 data in prefab FlaxEngine.Prefab, 0f0a7c114624a21cc4917290ab12cc3c, G:\FlaxProjects/DeletePrefabErrorRepro/Content/PRE_Test.prefab.
[ 00:08:42.379 ]: Cannot create object.
[ 00:08:42.379 ]: Failed to deserialize scene object from data: {
"ID": "10c868654072dc2349bfb290621c7f49",
"PrefabID": "0f0a7c114624a21cc4917290ab12cc3c",
"PrefabObjectID": "b1699c204736c75ccf418e83356ed5d3",
"ParentID": "2e39789e41bc766089ef73bed9ba2c87"
}
[ 00:08:42.379 ]: Parent actor of the missing object: 'EmptyActor' (FlaxEngine.EmptyActor)
```
Contributor guide
Assessment
This issue has not been assessed yet.