Search Issue Tracker
Fixed in 2023.1.0a1
NullReferenceException thrown when SerializedProperty.boxedValue is set to null
1. Open the attached project "1420665.zip"
2. Select a GameObject in the Hierarchy window
3. Click "Example\\Log Property Values" in the menu bar
Expected result: No NullReferenceException thrown
Actual result: A NullReferenceException is thrown:
"NullReferenceException: Object reference not set to an instance of an object
UnityEditor.SerializedProperty.set_boxedValue (System.Object value) (at /Users/bokken/buildslave/unity/build/Editor/Mono/SerializedProperty.bindings.cs:373)
BoxedValueExample.LogValue (UnityEditor.SerializedProperty serializedProperty, System.Text.StringBuilder log) (at Assets/BoxedValueExample.cs:56)
BoxedValueExample.LogProperties (UnityEngine.Object obj, System.Text.StringBuilder log) (at Assets/BoxedValueExample.cs:40)
BoxedValueExample.MenuCallback () (at Assets/BoxedValueExample.cs:14)"
Reproducible with: 2022.1.2f1, 2022.2.0a15
Not reproducible with: 2019.4.39f1, 2020.3.35f1, 2021.3.3f1 (SerializedProperty does not have a boxedValue property)
Reproducible on: macOS 12.0.1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Animation stops at the end of the transition duration when the Animator preview is played
- Imported FBX Models are not visible in the Scene or previewable in the Project files when the Parallel Import option is enabled
- Adding or removing assets to bundles will cause other assets to be rebuilt when BuildAssetBundleOptions.UseContentHash is used
- Prefab overrides cannot be obtained when Serialized via Property
- ScrollRect scrolls up when activating a GameObject with a ScrollRect and an InputField under specific conditions