In Godot 3.x, it was possible to export an array of multiline strings with export(Array, String, MULTILINE) var <variable>. This would result in a series of multiline fields you could easily expand and fill in in the inspector - ideal for entering lines into a simple dialogue system, which is exactly what I was using it for.

With its new @export_<type> annotations, Godot 4.0 Beta 1 doesn't appear to support this. Is there any way of achieving the same result in 4.x?

  • @export_multiline for arrays has been fixed in rc1.

Thanks for the responses, guys. Hopefully this will be a thing we can do again soon. In the meantime, I've just exported several multiline strings as a quick and dirty workaround.

You can use a CSV file are a database and read in string data from an Excel spreadsheet. That is one other way.

2 months later

cybereality the example given in the docs for exporting a list of strings produces error:

@export_enum annotation requires a variable of type "int" but type "String" was given instead.

    3 months later

    @export_multiline for arrays has been fixed in rc1.

    13 days later

    spacecloud
    I found this :
    @export_multiline var pnj_dialogues : PackedStringArray

    Don't test it yet but it show what i want in the inspector.