To be honest, i can’t answer your question directly. BUT i know, that the InfoTextBoxes (or what ever they are called) in the content_examples are using multiple lines. If i remember correctly, they are doing it with an array.
I also read something about multiline from slate, that is coming in 4.4. But i did not understand if its a BP feature, a c++/slate feature or an Editor feature.
Maybe someone else can provide more information. Thats all i got so far (:
The only workaround I found to add newlines in BP, is by making a new variable. You can write an actual new line in its default value (Press enter), then use the variable.
This was a great and simple solution in 4.5.
However, the newline method no longer works in 4.6
Staff, why was this capability removed?
It was a much simpler alternative to building an array of text, looping through the array and having to check the text height for display …just for a line break
I am using a HUD but not sure what you mean by “using a Receive Draw HUD event”.
Basically,
If I run UE4.5 and create a string variable in a HUD I can add a newline character to its default value by pressing ENTER (the editbox expands to confirm the invisible newline character is there).
If I do the same thing in UE4.6 then pressing ENTER does nothing.
When you say it works for you - what procedure are you following and in what version of UE?
the specific node I am referring to is in the image above. It is an event called “event receive draw HUD”. I tried the exact setup in the image above in 4.6.1 and in 4.7 preview 4 and both seemed to work as intended.
That ForLoop setup is the workaround suggested by /Lauren and works perfectly fine as you pointed out, however that setup is not what I am referring to.
had a much much simpler solution of using a newline character in a string variable. This is what has stopped working in 4.6 (see his comment above mine and yours in this same thread).
Ah I see, That was my mistake! I was very confused when you said that it didn’t work and I thought you were specifically referring to the workaround I provided. Thank you for the clarification!
We have an internal discussion going on adding the feature for multi line functionality into text and strings. I don’t have a timeframe of when this will be made available, however it is being looked at by the development staff for future re-release.
It’s a pity you can’t simply reinstate what was already there and working fine in 4.5, i.e. just press ENTER as the default value for a string variable.
That was basically ‘multiline functionality’ wherever you appended that newline variable.
Anyway, I have my workaround:
(1) In 4.5! create a HUD called BP_newline with a string variable called newline. The default value for this string variable is a newline character (press ENTER).
(2) Import BP_newline into my 4.6+ project, cast to access the newline variable (copy it to a local string variable if desired) and use it just like before.
It (at least) gets me back to 's simple append newline variable solution.
Add a new “Make Literal String” node. Put anything in the “Value” input.
Then select the node, and copy it (Either right click the node and select “Copy”, or press Ctrl+C).
Now open up any plain text editor (Notepad, Notepad++, etc.) and paste.
Now copy the whole text, and paste it into your blueprint.
You now have a “Make Literal String” node containing a new line.
Furthermore, if you want it to be a variable instead, after doing the above, right click the “Value” input pin and click “Promote to variable”, then compile the blueprint. This will create a new variable in the blueprint with a new line.
You actually don’t need a make literal string node. You can also do this method with Build String’s suffix input. Not sure, but it may work with any string input on any node. I didn’t try it until I saw 's post , but it does work with different nodes.