how can I achieve different colors for read and unread text

Posted: 06 May 2021 16:20
by a820715049

how can I achieve different colors for read and unread text? Please help me.


Re: how can I achieve different colors for read and unread text

Posted: 06 May 2021 21:55
by idaot

Hi, it's possible with C#: via the IScriptPlayer engine service, you can check whether the script has played previously by using the HasPlayed method. Attach a script with this check to a DialogueText object and change the color according to the returned bool value.


Re: how can I achieve different colors for read and unread text

Posted: 07 May 2021 02:52
by a820715049
idaot wrote: 06 May 2021 21:55

Hi, it's possible with C#: via the IScriptPlayer engine service, you can check whether the script has played previously by using the HasPlayed method. Attach a script with this check to a DialogueText object and change the color according to the returned bool value.

Thanks for your help! But I still need a little help. How can I check to a DialogueText object When the text changes?


Re: how can I achieve different colors for read and unread text

Posted: 07 May 2021 17:53
by idaot

DialogueText is the default name for the object that houses the text component for displaying text. You can create a new printer by right-clicking in Project window and navigating to Naninovel -> Default Printers -> Choose your preferred printer. By double clicking the object you can access the prefab and you'll find the DialogueText object in there and in its inspector you can attach a new script to it. Here's a guide on how to add said printer:

https://naninovel.com/guide/text-printe ... m-printers


Re: how can I achieve different colors for read and unread text

Posted: 09 May 2021 05:51
by a820715049
idaot wrote: 07 May 2021 17:53

DialogueText is the default name for the object that houses the text component for displaying text. You can create a new printer by right-clicking in Project window and navigating to Naninovel -> Default Printers -> Choose your preferred printer. By double clicking the object you can access the prefab and you'll find the DialogueText object in there and in its inspector you can attach a new script to it. Here's a guide on how to add said printer:

https://naninovel.com/guide/text-printe ... m-printers

Thank you very much!