Search Issue Tracker

Active

Votes

0

Found in

2017.4.0f1

2018.3.0a1

2019.1.0a1

2019.2.0a1

2019.2.8f1

2019.3.0a1

2020.1.0a1

Issue ID

1189787

Regression

No

Property reference is not disposed when it is redeclared in a script and the editor is restarted

Serialization

-

How to reproduce:
1. Open the sample Scene of the attached project "1189787.zip"
2. Open the TestSerializeField.cs script
3. Comment the 5th line of the TestSerializeField.cs script
4. Go back to the Editor so that the script recompiles
5. Uncomment the 5th line of the TestSerializeField.cs script
6. Go back to the Editor so that the script recompiles
7. Reopen the project

Expected result: Test field of the TestSerializeField component on the Manager GameObject is set to 0
Actual result: Test field of the TestSerializeField component on the Manager GameObject is set to 5

Reproducible with: 2017.4.33f1, 2018.4.11f1, 2019.1.14f1, 2019.2.8f1, 2019.3.0b6, 2020.1.0a8

Notes:
Saving the Scene after step 6 will prevent the issue from happening.
Doing the reproduction steps will not trigger a change in the Scene, therefore another change will have to be done to save the Scene.
The issue is reproducible with other variable types as well.

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.