Format Text only accepting wildcards?

Sorry if I’m posting this twice but the Submit New Thread button didn’t work?

Every tutorial I’ve seen for format text you get a pink text input, however I do the same thing and just get a grey wildcard one that I can’t attach a text thing to. It seems like the pink is the default behaviour? Can’t understand what I’m doing wrong, grateful for any help!

Hm, it seems that the behaviour of this node was improved recently and it now accepts *floats *and *ints *with no conversion (which is great!), but at the same time there is no auto-conversion for string variable anymore (the pink one).
You can still do it manually by dragging a wire off your string and typing ‘toText’:


edit: if you mouse-over the format node and hold ctrl+alt, you can see the old behaviour. The new wildcard thing means one can no longer enter default values. :expressionless: Oh, well.

New line

I’m no expert, but doesn’t this cause an issue with a well-known workaround to add new lines to text? What I have understood could be done with previous versions was, with a new pin you can add a word or whatever (like how you have “test”), and immediately after enter a ‘shift-enter’ so wherever “test” appears in the text, a new line will appear. It seems this can’t be done anymore. Is this true?

Never tried that before but it seems to work:

OK, but what about text variables? I want the format text node to extract a wildcard from the variable and convert it to a new line. Like the variable would include “this is the first line<>this is the second line”. The format text needs to convert <> to shift-enter.

Unsure whether this functionality is supported for the format node. What you could do, is to ParseIntoArrayon your string and use the delimiter to split it into chunks of text → loop and display one after another.

Thanks. I’ll check it out later. :slight_smile:

I’ve been looking around how to get line breaks into text variables for a while now.
I have my UI widget text populated by variables from my saveData. I would love to be able to have line breaks in these.

I finally found the work around using Format Text referenced in this thread, but those threads are almost a year old now, and I stumbled onto this thread which strongly indicates that it doesn’t work anymore thanks to the pins defaulting to wildcards.
I thought I was doing something wrong too, as every tutorial I’ve seen they just default to Pink (for text).

The above screenshot of breaking it into an array won’t work for me, because I have a dedicated screen location whee I want my text, and it’s a single variable.
Suppose I could do some insanity of parsing it out so I can add in line breaks, and then re-combining them all again into a single variable.
But that seems like a lot of unnecessary work

Donno if making them wildcards by default is an “improvement” if it breaks the only method we had to insert line breaks into text variables.
Wish they would just fix that…
Good stuff in here otherwise though.

Another solution is to preformat you text in an external word processor. Upon importing the *.cvs, the line-breaking is preserved, like in this UMG widget:

If you need to add line-breaks dynamically to the text, you can spawn TextBlocks in a loop to populate a VerticalBox, adding spacers in between, or adjusting the bottom padding.