Search Issue Tracker

Fixed in 2020.2.X

Votes

1

Found in

2019.4

2019.4.8f1

2020.2

Issue ID

1270261

Regression

No

Not NULL values are inserted when increasing the size of an array in the Inspector window

Serialization

-

How to reproduce:
1. Open the user's attached "TTT.zip" project
2. Right-click in the Project window and select Create -> Test1
3. Change the size of the "Serialized Derived 3 Array" to 1 in the Inspector window
4. Pay attention to "Ref Base 2" "Data" field

Expected result: NULL values are inserted into the array
Actual result: not NULL values are inserted into the array

Reproducible with: 2019.4.8f1, 2020.1.2f1, 2020.2.0a21
Cannot test with: 2018.4.26f1 (due to errors)

  1. Resolution Note (fix version 2020.2):

    Fixed in 2021.2.0a18

Comments (2)

  1. Elfstone

    Oct 20, 2020 08:53

    It's been months. OK, there are tons of bugs out there. I get it.

    I wrote my own serialization scheme on Unity before, though due to obvious reasons not as efficient and as well integrated as the built-in solution. But it's robust! Nothing this serious ever happened!

    I just filed another bug report about SerializeReference today, which was just as disastrous and unsolvable (for developers who don't have access to the source).

    If only I had known how low the bar is for Unity Tech to release a feature.

    One of the many reasons I have to dump Unity for some REAL Game Engines. Hopefully I won't be complaining about Unity3D for long.

  2. Elfstone

    Aug 19, 2020 01:41

    Not only is the Actual Result NOT NULL (it's supposed to be since it's a SerializeReference array of an abstract element type), but also the inserted value references whatever id zero Managed Reference Value in the asset, even though the type is totally incompatible (not assignable to the array's element type).

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.