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: 32
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
Posts: 202
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: 32
Joined: 26 Sep 2022 12:37

Re: I have a question about the chat printer.

Post by booksuny »

Thank you for your reply!

Post Reply