- Home /
GUI custom textfield cursor rendering
Hey guys I have problems with custom textfield guistyle in Unity. I put a simple background into it, custom font and yet there seems to be a problem with how the cursor is rendered (wrong position). Anyone has any ideas?
it could be many thing: the border, margin, padding, fixed height, alignement, the rect that you specify when using it... We lack information to help you out.
You could also just play with the fixed height to "align" the text...
This is also happening to me, and I've seens it on OSx. I've tried to play with all the options but it does not change anything. This issue has been introduced with new version of unity (prob 4.5) since it does work with older ones. Perhaps we should write to support.
@waxx @aisenai, there are different ways to create this kind of setup as PouletFrit mentioned. Can you send me a project (davidbe@unity3d.com) which includes the resources needed to identify the problem and we'll have a look.
Also, have you tried it with any other (newer) versions of unity. 4.5.2 is out now: http://unity3d.com/unity/download
@Usopp I’m sorry but your message “I have the same problem. $$anonymous$$y version of unity 4.5.1. All worked fine in 4.3.4. Does 4.5.2 solve the problem?” vanished while converting it to a comment.
The same offer to you: could you send me a project (davidbe@unity3d.com) which includes the resources needed to identify the problem and I’ll have a look.
Sorry, I can't. $$anonymous$$y internet connection is to slow and expensive now. It's a real problem to me to download a new Unity version or send you a project
Answer by David-Berger · Aug 11, 2014 at 01:52 PM
It is a bug. Please send a bug report (http://issuetracker.unity3d.com/) containing the procedure how to reproduce the bug on which platform you work on and the Unity versions you encountered the problem. Do not forget to add a simple project and the steps to reproduce the bug so that QA can reproduce the bug.
The bug was resolved and the fix is available in patch-release 4.5.5p1 - http://unity3d.com/unity/qa/patch-releases
Answer by Zogg · Sep 11, 2014 at 12:47 AM
Same here. Seems to come from the Font Size property. Found a workaround on the forums :
"As a workaround, you can generate a new font that has the matching size for the style's fontSize and use that for TextArea and TextField..." (...and set the font size in the GUIStyle to 0)