Search Issue Tracker
By Design
Votes
0
Found in
2017.4.0f1
2018.3.0a1
2018.3.4f1
2019.1.0a1
2019.2.0a1
Issue ID
1125289
Regression
No
Prefab Instance's Serialized Fields are not saved when changing them via Custom Editor Window
How to reproduce:
1. Open "Scene" scene in the attached "TestObjectsNotSaved.zip" project
2. Open Window > CUSTOM
3. Press "Assign random ID" in the opened Window
4. Observe the value on the "RndIdNoChild" GameObject's "SaveValue" Component, it should not be 0
5. Save and Reload the Scene
6. Observe the value on the "RndIdNoChild" GameObject's "SaveValue" Component
Expected Behavior: The value is saved after pressing the "Assign random ID" button and reloading the scene
Actual Behavior: The value is not saved(reset to the previous)
Reproducible with: 2017.4.20f1, 2018.3.5f1, 2019.1.0b3, 2019.2.0a4
Note: Inspect the "RndIdNoChild (1)" GameObject. It's value is saved every time, as it is not an instance of the Prefab.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Memory leak when a lot of UI elements are spawned and despawned
- Warnings are not logged in the Console window when using external code analyzers
- Errors “TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 288“ appear constantly when Prefab is open
- Crash on PPtr<Shader>::operator or NullException errors spammed in console when calling Dispose() on null GraphicsBuffer with baked Reflection Probes
- “EndRenderPass: Not inside a Renderpass” and other Render Graph errors in the Player when Render Graph is enabled and Overlay UI is used
Resolution Note (2019.2.X):
When making modifications to Prefab instances from code this modification needs to be recorded using PrefabUtility.RecordPrefabInstancePropertyModifications(obj); where 'obj' is the component or gameobject that has been modified.