Search Issue Tracker
By Design
Votes
0
Found in
2018.3.0a6
2018.3.0b4
2019.1.0a1
Issue ID
1089690
Regression
No
Changes made to a variable of a Script are not saved when they are made inside the Prefab Mode even with Autosave enabled
How to reproduce:
1. Open "TestFailingUnity2018-3-b4" Project.
2. Select "GameObject" which is a Child Object in Canvas -> GameObject (1)
3. Enter the Prefab Mode for "GameObject"
4. Change the Quantity in the Inspector Window under the "PRL Collection" Script
5. Exit the Prefab Mode - Quantity is not updated
Reproducible with: 2018.3.0b10, 2019.1.0a9
Earlier releases of Unity don't support Nested Prefabs
Expected Result: Values from a Script are saved from the Prefab Mode when Autosave is enabled
Actual Result: Values from a Script are not updated in the Inspector Window and changing quantity further freezes Unity Editor
Note: trying to change values in the Editor again will cause Unity to freeze. GameObject in the Scene has Children created from within both the Prefab Mode and Scene Hierarchy.
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
- Editor crashes on StoredGraphicsBuffer::GetGfxBufferID when VFX Graph property is modified during Play Mode and Application.targetFrameRate is used to limit FPS
- Crash on NVAPI_Thunk when changing Player resolution while HDR display is used and Direct3D12 is set as the graphics API
- Only one out of multiple cameras is shown in the Play Mode while HDR display is used and Direct3D12 is set as the graphics API
- The "Paste Component as New" option is incorrectly displayed as active despite the action being prohibited
- "TLS Allocator ALLOC_TEMP_TLS" errors are thrown when unsuccessfully importing an FBX file
Resolution Note:
You need to make sure the PrefabStage's scene is dirtied (so saving will kick in) when modifying the PrefabStage objects without using SerializedProperties. To dirty the PrefabStage's scene try the following:
var prefabStage = PrefabStageUtility.GetPrefabStage(yourGameObject);
if (prefabStage != null)
{
EditorSceneManager.MarkSceneDirty(prefabStage.scene);
}