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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Add comment