Search Issue Tracker

Duplicate

Votes

2

Found in

2019.3

2019.4.5f1

2020.1

2020.2

Issue ID

1266877

Regression

No

An error is thrown when opening a Scene which has two Prefabs with custom PropertyDrawer

Serialization

-

How to reproduce:
1. Open user's attached "serialize_reference_bug" project
2. Open the "SceneA" Scene

Expected results: No errors are thrown in the Console
Actual results: The "Could not udpate a managed instance value at property path 'modules.Array.data[3]', with value '4'" error is thrown in the Console

Reproducible with: 2019.3.0f3, 2019.4.8f1, 2020.1.2f1, 2020.2.0a20
Could not test with: 2018.4.26f1 because SerializeReference was not introduced, 2019.3.0a12 because of the CS1061 error, 2019.3.0f2 because opening the "SceneA" Scene crashes Unity with Fatal Error "The file'MemoryStream' is corrupted! Remove it and launch unity again!"

Notes:
- The error message has a typo in the "update" word, it is spelled as "udpate"
- The error appears only when opening the Scene
- Changing around the script values in the Prefabs that are in the "SceneA" sometimes makes the error go away and the error will not re-appear even if you set the values same as they were when the error was appearing
- It seems to happen when one of the Prefabs 4th value is set to "Empty" and seems to happen only for 4th value

Comments (2)

  1. joaoborks

    Aug 12, 2020 00:08

    This is related to the [SerializeReference] attribute and the only workaround that works for me is having multple prefabs, with [SerializeReference] arrays of different length.

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.