Substring replacement

Announcements, support questions, and discussion for the Dialogue System.
korsak42
Posts: 34
Joined: Tue Jul 19, 2022 7:36 am

Re: Substring replacement

Post by korsak42 »

I find another problem: sometimes my emphasis text changed color after i click on response and text changes also from "ColoredText" to "<b><color=XXXXXX>ColoredText</b></color>".
Where could I break something?
UPD: I found the source of the problem: it's gray accumulated text from this topic https://www.pixelcrushers.com/phpbb/vie ... lysium#top
How can i change it without losing emphasis?

And the continue button for some reason changes the text to the text of the first node in the conversation. Any help please!
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Substring replacement

Post by Tony Li »

Hi,

It sounds like you may have some things misconfigured. Would it be possible for you to send a reproduction project to tony (at) pixelcrushers.com? I'll be happy to take a look and let you know what's going on.
korsak42
Posts: 34
Joined: Tue Jul 19, 2022 7:36 am

Re: Substring replacement

Post by korsak42 »

Sorry it didn't clear for me. I need send it to your email Tony @ pixelcrushers.com
Right?
It may be a problem that the dialogues are in Russian?
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Substring replacement

Post by Tony Li »

Hello,

Russian should be fine. I don't read Russian, but I should be able to understand the <color> rich text codes.

Please email a download link to tony @ pixelcrushers.com. Include the steps I should follow to see the problem.
korsak42
Posts: 34
Joined: Tue Jul 19, 2022 7:36 am

Re: Substring replacement

Post by korsak42 »

Already sent! Subject "Broken Text Colors/Emphasis".

Also, one more question: looks like canvas from dialogue manager interferes with reading mouse clicks on my 2d map. Is there any way to disable or hide it when it's inactive?
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Substring replacement

Post by Tony Li »

korsak42 wrote: Sat Sep 17, 2022 5:44 pmAlready sent! Subject "Broken Text Colors/Emphasis".
Thanks! I'll check it now.
korsak42 wrote: Sat Sep 17, 2022 5:44 pmAlso, one more question: looks like canvas from dialogue manager interferes with reading mouse clicks on my 2d map. Is there any way to disable or hide it when it's inactive?
It shouldn't interfere if no UI elements are active. If no conversations are active, the dialogue UI in the canvas will not activate any UI elements.

However, if you want to disable it anyway if you want. Keep it disabled at design time. Then configure the dialogue UI's Dialogue Panel > UI Panel component > OnOpen() UnityEvent to enable the canvas and OnClosed() to disable at again.
korsak42
Posts: 34
Joined: Tue Jul 19, 2022 7:36 am

Re: Substring replacement

Post by korsak42 »

It shouldn't interfere if no UI elements are active. If no conversations are active, the dialogue UI in the canvas will not activate any UI elements.

This is strange because when I click on the city icon for the first time (this opens a dialog panel) everything is ok, but after I close the dialog if the city icon is on the right side of the screen (I use a scrollable prefab) nothing happens after clicking the mouse . At the same time, if the city icon is on the left side, everything works ok.

Maybe it's because I'm not ending the dialog correctly or something like that. I have dozens of dialogs that are called on an OnEnable object with the Narrator class. All Narrators are pooled into an object pool and then selected using the Narrator Select script. Accordingly, when I need to end the dialog at the end of the dialog, I need to write Variable["NarratorType"] = "0". This will close the dialog, but it doesn't seem to do it completely.
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Substring replacement

Post by Tony Li »

The rich text issue appears to be a bug with UI Text. Since it's a bug in Unity, there's nothing I can fix in the Dialogue System. If you can switch to TextMesh Pro, the same text will work fine. Unfortunately the evaluation version of the Dialogue System is precompiled without TextMesh Pro Support so devs who are not using TextMesh Pro in their projects can also try it. If you can use the Asset Store version and use TextMesh Pro, it should work.
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Substring replacement

Post by Tony Li »

korsak42 wrote: Sat Sep 17, 2022 7:50 pmThis is strange because when I click on the city icon for the first time (this opens a dialog panel) everything is ok, but after I close the dialog if the city icon is on the right side of the screen (I use a scrollable prefab) nothing happens after clicking the mouse . At the same time, if the city icon is on the left side, everything works ok.

Maybe it's because I'm not ending the dialog correctly or something like that. I have dozens of dialogs that are called on an OnEnable object with the Narrator class. All Narrators are pooled into an object pool and then selected using the Narrator Select script. Accordingly, when I need to end the dialog at the end of the dialog, I need to write Variable["NarratorType"] = "0". This will close the dialog, but it doesn't seem to do it completely.
Inspect the Dialogue Panel GameObject's UI Panel component. Tick Deactivate On Hidden:

deactivateOnHidden.png
deactivateOnHidden.png (55.01 KiB) Viewed 1075 times
korsak42
Posts: 34
Joined: Tue Jul 19, 2022 7:36 am

Re: Substring replacement

Post by korsak42 »

Oh, that's not good, but it's still hard to put into words how grateful I am for your help. I'm trying to save money now so I can buy the full version and not have to suffer anymore.

Did you see any text in the Continue button?
Post Reply