<br/> Appearing at the start of the text after Import from Articy
-
- Posts: 2
- Joined: Thu Oct 12, 2023 3:37 am
<br/> Appearing at the start of the text after Import from Articy
Hi,
I've been using Dialogue System for a while now, but I'm new to the forums!
I have recently been running into a problem, where using pipe (|) in Articy doesn't always import correctly. What I mean is that 90% of the time the pipe in Articy is correctly split into multiple nodes in Dialogues System.
But that other 10% seems to add <br/> at the beginning of the text.
Example:
In Articy:
In Game:
There are instances where text in Articy is longer and has multiple pipes - and some of them are split correctly, while some are split with the <br/>. It seems random to me and what seems to fix it sometimes is going back to Articy, deleting the pipe and adding it again. It's really hard to catch all instance like this, since in Articy it all looks the same.
Is there something I'm missing? Any pointers in the right direction are greatly appreciated!
Dialogue System v: 2.2.39
I've been using Dialogue System for a while now, but I'm new to the forums!
I have recently been running into a problem, where using pipe (|) in Articy doesn't always import correctly. What I mean is that 90% of the time the pipe in Articy is correctly split into multiple nodes in Dialogues System.
But that other 10% seems to add <br/> at the beginning of the text.
Example:
In Articy:
In Game:
There are instances where text in Articy is longer and has multiple pipes - and some of them are split correctly, while some are split with the <br/>. It seems random to me and what seems to fix it sometimes is going back to Articy, deleting the pipe and adding it again. It's really hard to catch all instance like this, since in Articy it all looks the same.
Is there something I'm missing? Any pointers in the right direction are greatly appreciated!
Dialogue System v: 2.2.39
Re: <br/> Appearing at the start of the text after Import from Articy
Hi,
Can you try DS version 2.2.40.2?
I'm testing with articy:draft 3.2.2 and DS 2.2.40.2, with this dialogue fragment:
In articy, "Export markup for text formatting?" is ticked.
The exported XML contains this:
The imported conversation in Unity does not contain "<br/>". It does, however, contain a line break:
I can make adjustments to remove that line break. But let's first make sure the <br/> issue is resolved.
Can you try DS version 2.2.40.2?
I'm testing with articy:draft 3.2.2 and DS 2.2.40.2, with this dialogue fragment:
In articy, "Export markup for text formatting?" is ticked.
The exported XML contains this:
Code: Select all
<LocalizedString Lang=""><![CDATA[<html><head><style>#s0 {text-align:left;} #s1 {font-size:11pt;} </style></head><body><p id="s0"><span id="s1">Foo|</span><br/><span id="s1">Bar</span></p></body></html>]]></LocalizedString>
I can make adjustments to remove that line break. But let's first make sure the <br/> issue is resolved.
-
- Posts: 2
- Joined: Thu Oct 12, 2023 3:37 am
Re: <br/> Appearing at the start of the text after Import from Articy
Hi, thanks for getting back to me on this!
We've updated to the latest DS, but still got the <br> tag.
We realised that the tag wasn't being added to ArticyTools.cs
So added the <br/> and now it seems to work!
Not sure why it was missing and if it needs to be added to the future DS updates?
We've updated to the latest DS, but still got the <br> tag.
We realised that the tag wasn't being added to ArticyTools.cs
So added the <br/> and now it seems to work!
Code: Select all
private static string[] htmlTags = new string[] { "<html>", "<head>", "<style>", "#s0", "{text-align:left;}", "#s1",
"{font-size:11pt;}", "</style>", "</head>", "<body>", "<p id=\"s0\">", "<span id=\"s1\">",
"</span>", "</p>", "</body>", "</html>", "<br/>" };
Re: <br/> Appearing at the start of the text after Import from Articy
Hi,
Some people will want to keep "<br>" in their text.
I'll make sure it's translated into a newline character during import and also add an option to remove them when splitting text on pipe characters.
I'll try to have a patch ready by the end of the weekend, sooner if possible.
Some people will want to keep "<br>" in their text.
I'll make sure it's translated into a newline character during import and also add an option to remove them when splitting text on pipe characters.
I'll try to have a patch ready by the end of the weekend, sooner if possible.
-
- Posts: 5
- Joined: Tue Dec 06, 2022 5:38 am
Re: <br/> Appearing at the start of the text after Import from Articy
Hi Tony, will the patch also remove new lines after pipes using the enter key without shift as well?
Re: <br/> Appearing at the start of the text after Import from Articy
Yes. I'll add a checkbox to remove <br>/newlines around pipes. It'll be ticked by default.
Re: <br/> Appearing at the start of the text after Import from Articy
This patch should fix the issue, too:
DS_ArticyPatch_2023-10-14.unitypackage
It adds a Trim Whitespace checkbox. The checkbox is ticked by default, so you shouldn't need to do anything extra.
DS_ArticyPatch_2023-10-14.unitypackage
It adds a Trim Whitespace checkbox. The checkbox is ticked by default, so you shouldn't need to do anything extra.
-
- Posts: 5
- Joined: Tue Dec 06, 2022 5:38 am
Re: <br/> Appearing at the start of the text after Import from Articy
It's all looking good now, thank you so much Tony!
Re: <br/> Appearing at the start of the text after Import from Articy
Happy to help! Thanks for the suggestion.