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
- MeshRenderer.sortingLayerID cannot be changed when change is being done in a built Player
- Warnings related to App Icon are being thrown when building project to VisionOS Platform
- [Mobile] Developer Console does not appear when an error is thrown
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
Add comment