Hello, on a custom property of type string.
I don’t know if this is normal.
The values are different when more than one line is put.
The format of the value in the TMX file changes.
I am parsing the TMX file and came across this.
Single-line strings are done with value="string content"
for consistency with all other properties. Multi-line strings are done like that because XML (the format TMX uses) only allows multi-line text as the text node inside of an element, it does not allow line breaks within attributes (or rather, it does, but they’re normalised to spaces, effectively losing data).
Line breaks could be done with \n
, but that might not be suitable, depending on how the user wants to use the string properties. Doing it this way, with a different format for multi-line strings, allows the data to appear in the file exactly as the user entered it in Tiled.
1 Like
Ok, I understand, thanks as always.