Search Issue Tracker
Fixed
Fixed in 2023.2.4f1, 2023.3.0a17
Votes
0
Found in
2023.1.0a22
2023.2.0a22
2023.3.0a1
Issue ID
UUM-21496
Regression
No
Singleline constraint ignored on TextField when value set in code to string with \n
*Summary:*
A user can set a TextField's multiline to false in code, but can then have a multiline value if he sets the value IN CODE to a string which contains \n.
!image-2022-12-14-11-55-07-733.png!
!image-2022-12-14-11-55-39-280.png!
*Extra Notes:*
When the value is set in code, there is no check for the multiline attribute.
Reproduction steps (in code):
1) In code, create a TextField
2) Set multiline = false
3) set the value to any string with a \n
*Expected Results:*
The \n is ignored and the string is displayed on 1 line.
*Actual Results:*
string is displayed on 2 lines.
*Tested on:*
Unity Version 2023.1.0a24, WIN10
Branch <name> [<commit hash>]
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Resolution Note (fix version 2023.3.0a17):
For this use, users should escape their escaped sequences before setting it through value. Otherwise, the generator will interpret them as valid characters and parse them accordingly.
Resolution Note (fix version 2023.2.4f1):
For this use, users should escape their escaped sequences before setting it through value. Otherwise, the generator will interpret them as valid characters and parse them accordingly.