I have a question about the chat printer.

All about user interface, be it customizing built-in UIs or adding new ones.
Post Reply
booksuny
Posts: 47
Joined: 26 Sep 2022 12:37

I have a question about the chat printer.

Post by booksuny »

I have a question while using the chat printer function.

  1. All the characters' lines are output from the left, so can we set the main character's lines to be output to the right like the actual iPhone's text?

  2. Is it possible to post a picture file on the chat message? For example, in a thriller game, you send threatening pictures by text message.

idaot
support
Posts: 275
Joined: 01 Aug 2020 08:25

Re: I have a question about the chat printer.

Post by idaot »

  1. This will require you to override either ChatPrinterPanel.cs or ChatMessage.cs (I suggest the latter) and listen to the OnAuthorChanged event to change or rearrange the ChatMessage prefab. If you are unfamiliar with overriding I suggest checking out the CustomUI example project (https://github.com/Naninovel/CustomUIExample) which has a ChatMessage override which adds timestamps to the messages.
  2. This will also require an override of ChatMessage.cs into which you can include a string parsing system (similar to the timestamp example). Be aware that smilies are supported out of the box when using TextMeshPro (look up TMPro documentation for setting it up) but for any larger images, the override is necessary.
booksuny
Posts: 47
Joined: 26 Sep 2022 12:37

Re: I have a question about the chat printer.

Post by booksuny »

Thank you for your reply!

kengreg
Posts: 1
Joined: 29 May 2023 04:31

Re: I have a question about the chat printer.

Post by kengreg »

So at the end how this is made? what it means to to a string parsing system?

Post Reply