Page 1 of 1

Sending Image in Chat

Posted: Sat Nov 30, 2024 1:34 am
by CluelessGD
Hi,

I have further question regarding the textline dialogue UI, I want the subtitles chat to sent "Image" and show it in the chat (like people sending real life picts in WhatsApp). The solution that I've used is using Text Mesh Pro's Inline Image and insert the rich text as link so when the player click the image it will trigger a script to pop up the image. I was wondering is there any other way to add image to the subtitles other than using TMP's Inline Image?

Cheers!

Re: Sending Image in Chat

Posted: Sat Nov 30, 2024 6:35 am
by Tony Li
Using TMPro's inline <sprite> tag is the easiest way to do it without having to do any programming. Otherwise you'd need to make a subclass of SMSDialogueUI and override AddMessage() to interpret some info in the dialogue entry and insert an image, and you'd need to account for this in the Record and ApplyPersistentData methods for saving and loading,