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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment