4 Commits

Author SHA1 Message Date
Lorenz Junglas
fad06b476f Fix nested prefab instances getting wiped when applying changes (#5232)
* Add tests for applying added prefab instances to prefabs

* Fix nested prefab instances getting wiped when applying changes

Prefab update serialization only kept instance data for nested roots sitting directly under the instance root, deeper ones (under group objects) got their mappings wiped in the prefab cache scene where they can't be rebuilt.
Also only convert children to nested after applying, flagging the applied root itself made it get silently adopted when dragged into another instance later.
2026-07-02 12:29:14 +02:00
Lorenz Junglas
da9ee038db Don't persist runtime flags (#5136)
* Don't persist runtime flags

We already dropped some flags when deserializing,
but really we should also prevent them from serializing in the first place.

This will prevent runtime flags like Loading (envmap probe) messing with prefab diffs.

Full flag set is still serialized when networking the object.
2026-06-25 10:30:16 +02:00
Lorenz Junglas
01e494b65a Fix nested prefab instances after break/reparent (#5097)
* Add test ensuring nested prefabs have valid mappings after unlinking there parent

* Initialize nested mappings in PostSerialize

InitMappingsForNestedInstance ran during deserialization before the object's id and children were set, so loaded nested instances got a lookup keyed by stale temporary ids.
Defer building those mappings to PostDeserialize.
2026-06-18 08:46:10 +02:00
Garry Newman
d95169d8fa Unit Test Cleanup (#5064)
* Move all unit tests to Engine/Tests
* Fix Margin.EdgeSubtract
* Fix Capsule.Contains
* EnvironmentVariables.Remove if it's null
* Fixed ray trace never returning startedsolid
* Fix HistoryList.Navigate on empty list
* Fix GameObject.WorldPosition accepting NaNs
* Fix flex: initial expanding to the wrong grow/shrink
* Translation.TryConvert shouldn't throw on invalid enum strings
* Skip sound file tests on machines with no audio device
2026-06-12 13:23:50 +01:00