[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/feed/attachments_base.php on line 95: Undefined array key 44160
Pixel Crushers Forum Support and discussion forum for Pixel Crushers products 2024-05-02T23:46:34-04:00 https://www.pixelcrushers.com/phpbb/app.php/feed/topic/8138 2024-05-02T23:46:34-04:00 2024-05-02T23:46:34-04:00 https://www.pixelcrushers.com:443/phpbb/viewtopic.php?p=44166#p44166 <![CDATA[Re: How to set DialogueSystemController.overrideGetLocalizedText to work with Dialogue Editor]]>
Do it in OnConversationLine(Subtitle). By the time OnConversationLine runs, subtitle.formattedText.text will contain the text that the player will see, without markup tags.

Statistics: Posted by Tony Li — Thu May 02, 2024 11:46 pm


]]>
2024-05-02T23:05:20-04:00 2024-05-02T23:05:20-04:00 https://www.pixelcrushers.com:443/phpbb/viewtopic.php?p=44165#p44165 <![CDATA[Re: How to set DialogueSystemController.overrideGetLocalizedText to work with Dialogue Editor]]>
In case I design to do it at runtime, does the text that replaces in OnConversationLine(Subtitle subtitle) will perform tags that control actor subtitle or else for example [panel=0] [picc=?] or should I do it at OnPrepareConversationLine instead.

example
key: character/character01-name-localization-key
value: Hello World! [panel=2]

Statistics: Posted by preeda — Thu May 02, 2024 11:05 pm


]]>
2024-05-02T22:46:13-04:00 2024-05-02T22:46:13-04:00 https://www.pixelcrushers.com:443/phpbb/viewtopic.php?p=44162#p44162 <![CDATA[Re: How to set DialogueSystemController.overrideGetLocalizedText to work with Dialogue Editor]]>
1. If you want to do it at edit-time, write an editor script that adds the localized fields to your database. For example (assuming your method is called GetTranslation(string) in this example):

Code:

foreach (var conversation in database.conversations){    foreach (var entry in conversation.dialogueEntries)    {        Field.SetValue(entry.fields, "LK", GetTranslation(entry.DialogueText), FieldType.Localization);    }}EditorUtility.SetDirty(database);
2. If you want to do it at runtime, add a script with an OnConversationLine(Subtitle) method to your Dialogue Manager GameObject:

Code:

void OnConversationLine(Subtitle subtitle){    subtitle.formattedText.text = GetTranslation(subtitle.formattedText.text);}

Statistics: Posted by Tony Li — Thu May 02, 2024 10:46 pm


]]>
2024-05-02T22:29:43-04:00 2024-05-02T22:29:43-04:00 https://www.pixelcrushers.com:443/phpbb/viewtopic.php?p=44160#p44160 <![CDATA[Re: How to set DialogueSystemController.overrideGetLocalizedText to work with Dialogue Editor]]> DialogueSystemController.overrideGetLocalizedText in runtime but the data(Dialogue Text, Display Name) read from DialogueDatabase at runtime doesn't call my delegate function.

I tried another language called "LK" and switched to this language but the system only replaced the text from Dialogue Text with LK field, same for the default language

The value from "LK" field is a key that will get the localized text from my delegate function.
So I expected the value from "LK" or default if I didn't switch to "LK" to pass the value into the delegate function.

Statistics: Posted by preeda — Thu May 02, 2024 10:29 pm


]]>
2024-05-02T22:29:43-04:00 2024-05-02T22:29:43-04:00 https://www.pixelcrushers.com:443/phpbb/viewtopic.php?p=44159#p44159 <![CDATA[Re: How to set DialogueSystemController.overrideGetLocalizedText to work with Dialogue Editor]]> DialogueSystemController.overrideGetLocalizedText in runtime but the data(Dialogue Text, Display Name) read from DialogueDatabase at runtime doesn't call my delegate function.

I tried another language called "LK" and switched to this language but the system only replaced the text from Dialogue Text with LK field, same for the default language

The value from "LK" field is a key that will get the localized text from my delegate function.
So I expected the value from "LK" or default if I didn't switch to "LK" to pass the value into the delegate function.
Screenshot 2024-05-03 092535.png

Statistics: Posted by preeda — Thu May 02, 2024 10:29 pm


]]>
2024-05-02T07:55:18-04:00 2024-05-02T07:55:18-04:00 https://www.pixelcrushers.com:443/phpbb/viewtopic.php?p=44133#p44133 <![CDATA[Re: How to set DialogueSystemController.overrideGetLocalizedText to work with Dialogue Editor]]>
What are you using to localize your text? DialogueSystemController.overrideGetLocalizedText is a runtime delegate; it won't work outside of play mode while you're editing in the Dialogue Editor. Maybe also related: Localization

Statistics: Posted by Tony Li — Thu May 02, 2024 7:55 am


]]>
2024-05-02T06:51:58-04:00 2024-05-02T06:51:58-04:00 https://www.pixelcrushers.com:443/phpbb/viewtopic.php?p=44131#p44131 <![CDATA[How to set DialogueSystemController.overrideGetLocalizedText to work with Dialogue Editor]]>

Code:

DialogueSystemController.overrideGetLocalizedText
but the localization setup from Dialogue Editor doesn't call this delegate to get the localized text.
Do we have a way to make Dialogue Editor get a localized text from the delegate function?

Statistics: Posted by preeda — Thu May 02, 2024 6:51 am


]]>