Search Issue Tracker
By Design
Votes
0
Found in
2017.3.0b7
Issue ID
963890
Regression
No
Text Mesh Pro Input Caret resets to wrong position
The TextMesh Pro InputField caret resets to the wrong position with specific settings on the text viewport's pivot.
To reproduce:
1. Download attached project + Open Main Scene
2. Enter Play mode
3. Deselect + reselect both text field's
Notice how the alignment of the caret fails on the second text field.
Seems to be being cause by the object 'InputField_NotWorking' having its pivot set to (0.5, 1.0). Setting the pivot to (0.5, 0.5) makes it work correctly.
Comments (1)
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
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
- Previously deleted “DefaultLookDevProfile“ is present when upgrading the Editor version
- [Ubuntu] UI text and buttons are missing spaces in Unity Version Control > New Workspace window
- "Inherit attribute is not supported" warning is shown but attributes are available in VFX Graph Output and Update blocks
NickMcCo
Apr 04, 2018 00:21
I am still having this issue, maybe I'm using an old version of textmeshpro or something. Anyway, for future googlers, this is how I solved the problem:
UsernameField.onSelect.AddListener(i => {
var rect = UsernameField.GetComponentInChildren<TMP_SelectionCaret>().rectTransform;
rect.anchoredPosition =
new Vector2(-(rect.rect.width/2), rect.anchoredPosition.y);
});