Search Issue Tracker
Fixed in 2022.2.X
Fixed in 2021.2.X, 2022.1.X
Votes
0
Found in
2021.2.11f1
2022.1.0b7
2022.2.0a4
Issue ID
1399997
Regression
Yes
Clicking scale constraint button on 2D object doesn't apply constraint and throws NullReferenceException
How to reproduce:
1. Create a new project
2. Create any 2D object (e. g. Image)
3. Click Scale constraint button on Rect Transform
Expected result: Constraint is set and no error is thrown
Actual result: Constraint is not set and NullReferenceException is thrown
Reproducible with: 2021.2.11f1, 2022.1.0b7
Not reproducible with: 2021.2.10f1, 2022.1.0b6
Couldn't test with: 2020.3.27f1 (no such feature)
Full error: NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorGUI.LinkedVector3Field (UnityEngine.Rect position, UnityEngine.GUIContent label, UnityEngine.GUIContent toggleContent, UnityEngine.Vector3 value, System.Boolean& proportionalScale, UnityEngine.Vector3 initialScale, System.UInt32 mixedValues, System.Int32& axisModified, UnityEditor.SerializedProperty property, UnityEditor.SerializedProperty proportionalScaleProperty) (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorGUI.cs:4429)
UnityEditor.ConstrainProportionsTransformScale.DoGUI (UnityEngine.Rect rect, UnityEngine.GUIContent scaleContent, UnityEngine.Vector3 value, UnityEngine.Object[] targetObjects, System.Int32& axisModified, UnityEditor.SerializedProperty property, UnityEditor.SerializedProperty constrainProportionsProperty) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/ConstrainProportionsTransformScale.cs:28)
UnityEditor.RectTransformEditor.OnInspectorGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/RectTransformEditor.cs:303)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Editor/Inspector/InspectorElement.cs:636)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Getting a deprecated package for JetBrains Rider pop up when opening or creating a project
- [Android] Volume level of the same audio file is different on Samsung Galaxy Tab A8 between 2023.3.0b3 and 2023.3.0b4
- ‘Expected end of value’ warning occurs when a property declaration includes five or more variable references
- Crash on BurstCompilerService::CompileAsync when entering Play mode in a specific scene
- InvalidOperationException when using Game Camera Preview in Scene window with a custom RenderGraph pass
Add comment