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
- Errors are logged when importing an asset at a path with Firebase
- Entering too big of a number in 2D Renderer Lightmode Tags freezes the Editor
- Crash on GUIManager::DoGUIEvent when focusing on the Game view window on a specific project
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
Add comment