Search Issue Tracker
Fixed in 2021.2.X
Votes
22
Found in
2019.4
2020.1
2020.2
2020.2.0f1
2021.1
Issue ID
1299716
Regression
No
Changing the reference value in the ScriptableObject's script and re-opening the project will result in NULL reference error
Reproduction steps:
1. Open the user's attached project "SkyboxRepro.zip"
2. In the Project window open Assets/DATA/Broken/BrokenRefNull Scene
3. In the Hierarchy window expand the "BrokenRefNull Scene" and select "CLICK ME!" GameObject
4. Observe the "CustomScriptableObjectDebugger" script property "SEE BELOW" in the Inspector window
5. Close the project, go to the project's folder and open Assets/DATA/Broken/Buggy Scriptable Object.asset
6. Modify the file's script line 16 from "dummyVal: 4" to "dummyVal: 2"
7. Re-open the project and repeat steps 2-4
Expected result: "CustomScriptableObjectDebugger" script property "SEE BELOW" has no "[ERROR] customScriptableObject.customMonobehavior = NULL"
Actual result: "CustomScriptableObjectDebugger" script property "SEE BELOW" has a "[ERROR] customScriptableObject.customMonobehavior = NULL"
Reproducible with: 2019.4.16f1, 2020.1.17f1, 2020.2.1f1, 2021.1.0a9
Could not test with: 2018.4.30f1 (Multi-object editing not supported)
Note:
- In the script, the reference to the customMonobehavior in the prefab is now NULL even though in the Prefab it is clearly seen that the reference is valid
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Inspector's custom tooltip is displayed incorrectly when the name is truncated in UI toolkit
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
Resolution Note (fix version 2021.2):
Fixed in: 2021.2.0b1