Search Issue Tracker

Fixed in 2022.1.X

Fixed in 2020.3.X, 2021.1.X, 2021.2.X

Votes

5

Found in

2019.3.0a3

2019.3.15f1

2020.1

2020.2

Issue ID

1252436

Regression

Yes

AssetDatabase.ForceReserializeAssets modifies data when used on a Prefab with a nested 3D model

Asset - Database

-

How to reproduce:
1. Open the attached "1252436 repro" project
2. Copy the content of Assets/HubProduction.prefab and save it for later
3. Open "Prefab" Prefab from the Assets folder
4. Select the "MetalCube" GameObject from the Hierarchy window
5. Disable and enable the "MetalCube" GameObject
6. Save the Prefab
7. Copy the content of Assets/HubProduction.prefab and compare it against the content of the 2nd step
8. Select the "Prefab" Prefab from the Assets folder and press "Tools" > "Resave selected assets"
9. Copy the content of Assets/HubProduction.prefab and compare it against the content of the 7th step

Expected result: the file content hasn't changed since Serialization should not modify prefabs
Actual result: a block of data has been moved to a different place in the file

Reproducible with: 2019.3.0a3, 2019.4.1f1, 2020.1.0b13, 2020.2.0a15
Not reproducible with: 2018.4.23f1, 2019.3.0a2

Notes:
-It's easiest to reproduce this issue by using a Version Control program like GitHub Desktop to track the changes.
-The data being moved to different places in the file is usually Animator's data but it doesn't seem to be exclusively problematic
-The issue isn't exclusive to .fbx format, the same behavior reproduces with .obj and .dae file formats

  1. Resolution Note (fix version 2022.1):

    Fixed in 2022.1.0a3

  2. Resolution Note (fix version 2021.2):

    Fixed in 2021.2.2f1

  3. Resolution Note (fix version 2021.1):

    Fixed in 2021.1.26f1

  4. Resolution Note (fix version 2020.3):

    Fixed in 2020.3.21f1

Comments (3)

  1. mariozhou

    Aug 31, 2023 09:51

    In the 2020.3.25f1 version, we still suffer from this issue.
    Any progress on this?

  2. manu_unity836

    Jan 28, 2021 15:57

    Yep same. https://issuetracker.unity3d.com/issues/re-serialization-make-changes-to-nested-prefabs says it should be fixed but we're running into the same issue multiple times per day on 2019.3.0f6.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.