Search Issue Tracker
Fixed
Fixed in 2023.1.0b8, 2023.2.0a6
Votes
0
Found in
2023.1.0b5
2023.2.0a3
Issue ID
UUM-27567
Regression
Yes
Input results in a "NullReferenceException" when passing "null" to "GUILayout.TextField"
Reproduction steps:
1. Open the “TextFieldNull“ project
2. Open the “TestWindow” window (Tools > TestWindow)
3. Select the text field, input any character, and observe the Console
Expected result: the character is inputted to the text field, and there is no “NullReferenceException” in the Console
Actual result: the character is not inputted to the text field, and there is a “NullReferenceException: Object reference not set to an instance of an object UnityEngine.TextEditingUtilities.ReplaceSelection (System.String replace) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/TextEditingUtilities.cs:459)“ error in the Console
Reproduced in: 2023.1.0a20, 2023.1.0b5, 2023.2.0a3
Not reproduced in: 2020.3.45f1, 2021.3.19f1, 2022.2.7f1, 2023.1.0a19
Reproduced using: macOS 13.0.1 (Intel), Windows 10 (by the reporter)
Note: not reproduced with “EditorGUILayout.TextField”
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Screen.resolutions returns resolutions that include the notch area when called on Macs with a notch
- Shader Graph Editor Throws Exception When Deleting Custom Function Node
- Outlines are visible on Mesh when Alpha Clipping is enabled and Surface Type is set to Opaque
- UI Elements are not getting focused when navigating through using arrow keys if they’re placed in a specific position
- Deleted scene selection is wonky in the Build Settings
Add comment