Hi. I found the discussions elsewhere in this forum about how to show display names, however I am experiencing a bug:
Example conversation text set in the DB/inspector:
It's ... uh ... my ... my name is [lua(Actor["Player"].Display_Name)]. This text is now overlapping!
The result when playing the game is:
When I view the text field via the inspector at that time (WHILE playing) it looks like this:
It's ... uh ... my ... my name is Wretched Human . This text is now overlapping!
See the space after "Human" that got inserted? If I copy-paste that text from the inspector, into NotePad, there seems to be a "new line" or carriage return in there:
It's ... uh ... my ... my name is Wretched Human
. This text is now overlapping!
My text field is a TMPro textfield and yes, Rich Text is enabled.
Help!
Overlapping text when inserting Player Display name
Re: Overlapping text when inserting Player Display name
Hi,
Check the TextMeshProUGUI's Overflow property. It should be set to Overflow.
If your text has a carriage return (<CR>) character but not a line feed (<LF>), TextMesh Pro will start typing at the beginning of the line but it won't move down one line.
Check the TextMeshProUGUI's Overflow property. It should be set to Overflow.
If your text has a carriage return (<CR>) character but not a line feed (<LF>), TextMesh Pro will start typing at the beginning of the line but it won't move down one line.
Re: Overlapping text when inserting Player Display name
Overflow is already on and multi-line text appears normally if I don't use that special lua code tag.
I'm trying to find the scripts where the text gets converted and assigned but having a hard time figuring out where to look.
I'm trying to find the scripts where the text gets converted and assigned but having a hard time figuring out where to look.
Re: Overlapping text when inserting Player Display name
Hi,
I don't think the [lua(code)] tag is adding the line feed. It's much more likely that there's a line feed hiding in your Player actor's Display Name field.
BTW, if the player is the conversation's actor, you can use [var=Actor] instead of [lua(Actor["Player"].Display_Name)]. It will probably still have the same problem, though, since I suspect the problem is in the Display Name field's value.
I don't think the [lua(code)] tag is adding the line feed. It's much more likely that there's a line feed hiding in your Player actor's Display Name field.
BTW, if the player is the conversation's actor, you can use [var=Actor] instead of [lua(Actor["Player"].Display_Name)]. It will probably still have the same problem, though, since I suspect the problem is in the Display Name field's value.
Re: Overlapping text when inserting Player Display name
You are probably correct. I checked and could see no extra characters in the display name, but I clicked Delete a couple times anyways and now everything displays correctly!
Also thanks for the simplification tip.
Also thanks for the simplification tip.
Re: Overlapping text when inserting Player Display name
Glad to help!