Search Issue Tracker
Fixed in 2018.3.X
Votes
0
Found in
2018.3.0a2
Issue ID
1051734
Regression
No
NullReferenceException overriding properties of UI objects by right clicking the property in the Inspector
If you have an object with UI components as a prefab and attempt to override a property of the UI component by right clicking in the Inspector and selecting apply, a NullReferenceException will occur. Note that this doesn't happen when applying changes via the Overrides dropdown.
NullReferenceException: SerializedObject of SerializedProperty has been Disposed.
UnityEditor.SerializedProperty.Verify (VerifyFlags verifyFlags) (at C:/buildslave/unity/build/Editor/Mono/SerializedProperty.bindings.cs:322)
UnityEditor.SerializedProperty.get_propertyPath () (at C:/buildslave/unity/build/Editor/Mono/SerializedProperty.bindings.cs:497)
UnityEditor.PrefabUtility.ApplyPrefabPropertyOverride (UnityEditor.SerializedProperty instanceProperty, System.String assetPath, InteractionMode action, Boolean singlePropertyOnly) (at C:/buildslave/unity/build/Editor/Mono/Prefabs/PrefabUtility.cs:455)
UnityEditor.PrefabUtility.ApplyPrefabPropertyOverride (UnityEditor.SerializedProperty instanceProperty, System.String assetPath, InteractionMode action) (at C:/buildslave/unity/build/Editor/Mono/Prefabs/PrefabUtility.cs:391)
UnityEditor.TargetChoiceHandler.ApplyPrefabPropertyOverride (System.Object userData) (at C:/buildslave/unity/build/Editor/Mono/GUI/TargetChoiceHandler.cs:57)
UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, Int32 selected) (at C:/buildslave/unity/build/Editor/Mono/GUI/GenericMenu.cs:119)
1. Install Unity
2. Open the attached project
3. Open TestScene.scene
4. Select "Image" from the Scene Hierarchy
5. Change any property on the Image Component
6. Right click on the name of the changed property in the Inspector and apply the overrides.
Result:
A NullRef occurs.
Expected Result:
The override should be applied correctly with no errors or exceptions.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Spot Light with 'Box' Shape stops working when it collides with Mesh
- Accepting Asset Store EULA endless loop in Package Manager window
- “InvalidOperationException: Sequence contains no matching element“ error when reenabling a custom Debug Draw Mode
- Prefab that contains a layout group is marked as changed by the Editor when opened
- Emission animation does not appear when the "Emission Map" parameter is set to black in a Lit material
Add comment