Mobile UI

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Mahaut
Posts: 14
Joined: Sat Oct 10, 2020 1:21 pm

Mobile UI

Post by Mahaut »

Hello,
I am sorry if this question has already been asked.
I saw a topic which looks like mine, unfortunately it is not exactly about what I'm asking.

I am discovering PlayMaker and Dialogue System, and I have some troubles with Unity. I would like to make a Mobile/SMS/Whatsapp conversation. Using the basic Templates, I do not find how to create different shape for the NPC and the PC sentences.
The expected behaviour would be: the NPC's sentences appear in a certain color block and the PC appear in another color (both differently aligned) stacked.
But currently, all the sentences appear in the same subtitle zone.

I do not know if Dialogue System is sufficient to do what I want ^^

Thank you for your help.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Mobile UI

Post by Tony Li »

Hi,

You may be interested in the Textline project available on the Dialogue System Extras page. It works line an SMS app.
Mahaut
Posts: 14
Joined: Sat Oct 10, 2020 1:21 pm

Re: Mobile UI

Post by Mahaut »

Hello Tony
Thanks a lot, I'm trying to reproduce the example, that's exactly what I was looking for!

Can I add a stupid question?
I can't visualize the Textline UI in unity scene. A hint explains that you have to set the Canvas Alpha to 1 but it does nothing.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Mobile UI

Post by Tony Li »

Hi,

The Dialogue Manager's Dialogue UI field points to a prefab. At runtime, it instantiates a copy of the prefab into the scene as a child of the Dialogue Manager's Canvas.

To see the UI, open the Textline Dialogue UI prefab.

If you're going to customize it, I recommend these steps:

1. Add an instance of the prefab to your Dialogue Manager's Canvas.

2. Assign this instance to the Dialogue Manager's Dialogue UI field.

3. Customize the instance. You can save it as a new prefab if you want.

This way you're not customizing the original prefab, so if you import an update to Textline it won't overwrite your customizations.
Mahaut
Posts: 14
Joined: Sat Oct 10, 2020 1:21 pm

Re: Mobile UI

Post by Mahaut »

Hello,
Thank you for all your help and explanation. It works \o/
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Mobile UI

Post by Tony Li »

Glad to help!
Post Reply