Working with IObjectLocalizableText
Posted: Mon 29. Jul 2019, 12:42
Hello,
I am currently setting up the FlowPlayer with Unity, and I have encountered a small problem regarding a piece of code in my flow manager.
At one point, I check if the paused object has a localizable text, with:
(I am working on a code made by someone else, thus I don't know if this piece is originally brought by Articy)
At the end of this if process, the CloseDialogue() is called, which allows the flow to resume.
However, this if statement is also checked by any kind of nodes, including hubs or jumps, which completely makes them skip their pause.
You can see here that I forced the statement to only include my dialogues, which are the only displayed texts for the moment. But this isn't optimal, as I may need to display things at other points in my game. I guess I could then check for all types of nodes displaying text, but you can see how unpractical this will become.
So, here's my question:
How can I make sure that only objects with Localizable Texts get checked in this function?
Or maybe this is something I could just change directly in Articy?
TL;DR:
I can't make IObjectwithLocalizableText work, or there is something I don't understand in this.
Thank you in advance!
I am currently setting up the FlowPlayer with Unity, and I have encountered a small problem regarding a piece of code in my flow manager.
At one point, I check if the paused object has a localizable text, with:
- Code: Select all
if (modelWithText != null && aObject is IDialogueFragment)
{
dialogText.LocaKey = modelWithText.LocaKey_Text;
}
(I am working on a code made by someone else, thus I don't know if this piece is originally brought by Articy)
At the end of this if process, the CloseDialogue() is called, which allows the flow to resume.
However, this if statement is also checked by any kind of nodes, including hubs or jumps, which completely makes them skip their pause.
You can see here that I forced the statement to only include my dialogues, which are the only displayed texts for the moment. But this isn't optimal, as I may need to display things at other points in my game. I guess I could then check for all types of nodes displaying text, but you can see how unpractical this will become.
So, here's my question:
How can I make sure that only objects with Localizable Texts get checked in this function?
Or maybe this is something I could just change directly in Articy?
TL;DR:
I can't make IObjectwithLocalizableText work, or there is something I don't understand in this.
Thank you in advance!