Search Issue Tracker

Fixed in 2022.1.X

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

Votes

0

Found in

2019.4

2019.4.18f1

2020.3

2021.1

2021.2

Issue ID

1328065

Regression

No

Null references on Prefab after changes are made to ScriptableObject GUID and public script references

Serialization

-

Reproduction steps:
1. Open attached project "NullRef.zip"
2. Open Assets/SampleAsset.asset.meta in a text editor, modify the last character of it's GUID and save the file
3. In Project window, select Assets/GameObject
4. In Inspector window, observe SampleScript component's SA field ("Missing")
5. In Project window, open Assets/SampleScript.cs
6. In Script Editor, add a new public GameObject reference and save the changes
7. In Project window, select Assets/GameObject
8. In Inspector window, observe SampleScript component's SA field ("None")
9. Undo the changes made in Assets/SampleAsset.asset.meta with text editor and save the changes
10. In Inspector window, observe SampleScript component's SA field ("None")
11. In script editor, remove the new field from Assets/SampleScript.cs and save the changes
12. In Inspector window, observe SampleScript component's SA field (reference becomes valid)
13. In script editor, add the field again to Assets/SampleScript.cs again and save the changes
14. In Inspector window, observe SampleScript component's SA field ("None")
15. In Project window, open Assets/GameObject.prefab
16. In Inspector window, observe SampleScript component's SA field (valid when in Prefab mode)

Expected result: The reference to SampleAsset.asset in GameObject.prefab should remain valid before and after steps 11-16
Actual result: The reference to SampleAsset.asset in GameObject.prefab is valid after removing new field and in Prefab mode

Reproducible with: 2019.4.24f1, 2020.3.4f1, 2021.1.2f1, 2021.2.0a13
Could not test with: 2018.4.34f1 (console errors break project)

  1. Resolution Note (fix version 2022.1):

    Fixed in 2022.1.0a7

  2. Resolution Note (fix version 2021.2):

    Fixed in 2021.2.0b13

  3. Resolution Note (fix version 2021.1):

    Fixed in 2021.1.25f1

  4. Resolution Note (fix version 2020.3):

    Fixed in 2020.3.20f1

  5. Resolution Note (fix version 2019.4):

    Fixed in 2019.4.32f1

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.