Forum rules - please read before posting.

Line breaks in Popup-Variables


I am trying to implement a tutorial to my game, and after some fiddling around a bit, I think using PopUp-Variables for the texts of the tutorial steps would be the best solution, as they can be translated.

However, it seems that line breaks are not supported when the text is printed (I have created a menu with a replacement token linked to a Unity UI text-field that displays the current value of the popup).

Using "\n" also does not work, it only prints "\n" into the text...

Maybe this is intended behaviour, as the edit field for the values is no text area, where I can use the Enter key (like in the editor fields for speech text), but is there a way to put line breaks into this string that will be printed correctly in a UI Text?


  • By design, I'm afraid - PopUp variables are intended for single-line strings.

    You can instead rely on String variables - which do support line-breaks as well as translation.

    However for tutorials, I'd recommend the use of Objectives - with each step of the tutorial being a separate State in a single "Tutorial" Objective. State descriptions support both line-breaks and translation. For an example, AC's Physics Demo relies on Objectives for this purpose.

  • Thank you very much Chris.

    I first worked with the string variables, but noticed that they (obviously) will be completely saved into the savegame file, making it much bigger than necessary for a small portion of the game's beginning ;)

    Objectives work like a charm. When I looked at them, I thought that I would have only one Text-Field to display, but with the state description, which I can use as the Title for my window, I have two texts just like I need :)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.