Page 1 of 1

Emergency Help on Dialogue System

Posted: Sun Mar 29, 2015 6:36 pm
by rjr130
I am currently using Dialogue System in Unity on one of my 2D projects and I meet some problems... Hope someone could help me figure them out here..







The first thing is how I could use customized pictures instead of the default ones as the UI of my dialogue. I was trying to use bubbles that my friend drew as the UI for the PC/NPC subtitle panel however I could not find a way to alternate that..



The second question is since I am working on a mobile project with dialogue system. So I really need to set the size of the dialogue window responsively to the screen size/resolution. However, it seems not possible for me to find out a way to do that... Is there anyone here could help me on this issue? I would be really appreciated!!



Sorry I am quite new to Unity and thanks again for any effort on helping me!

Emergency Help on Dialogue System

Posted: Mon Mar 30, 2015 2:05 am
by Tony Li
Hello,



Unity comes with two GUI systems: legacy Unity GUI, and the new Unity UI.



If you're using the new Unity UI:



1. Add a Canvas Scaler to your canvas. This will scale responsively to the screen size.



2. Select the bubble image, and in the Inspector view change the Texture Type to "Sprite (2D and UI". Then you can assign it to images in the dialogue UI.



More info: Unity UI Dialogue UI







If you're using the legacy Unity GUI:



1. All GUI controls use scaled rects. Use "Normalized" values, which are based on the size of the screen, where 1.0 = the full width or height of the screen. (0.5 is half of the screen size.)



2. Most of the images are defined in the dialogue UI's GUI Skin, which is assigned to its GUI Root object. Edit the GUI Skin and assign your images there. The texture type should be set to "GUI".



More info: Unity GUI Dialogue UI

Emergency Help on Dialogue System

Posted: Mon Mar 30, 2015 10:22 pm
by rjr130
Hi Tony,



Thanks for you reply! It seems now I know how to customize the UI. However something I am still not sure with is if I want to customize the Circle Dialogue UI, is it possible for me to instead of having only 1 subtitle for both PC and NPC, can I have subtitles for each of them (so I could assign different background pictures for them)?







Thanks again for helping me!

Emergency Help on Dialogue System

Posted: Tue Mar 31, 2015 2:57 pm
by Tony Li
Hi,



The Circle Dialogue UI has a PC Subtitle section at the top and an NPC Subtitle section at the bottom. You can customize the rules for when they're shown and hidden. To do this, inspect your Dialogue Manager GameObject. Tick or untick the checkboxes in Display Settings > Subtitle Settings. (<-- follow the link for descriptions of what each checkbox does.)







If you need to customize the appearance of the dialogue UI, such as changing graphics, fonts, or screen positions, follow these steps:



The Circle Dialogue UI is a legacy Unity GUI prefab, which uses a GUI Skin. I haven't yet built a version of this prefab that uses the new Unity UI, but the textures are included so you could do this if you prefer to switch to Unity UI at some point.



To customize the Circle Dialogue UI:







1. Make a copy of the Circle Dialogue UI prefab. I always recommend editing copies, not the original. Otherwise you'll lose your changes when you import a newer version of the Dialogue System. Let's say you've named the copy MyCircleUI.







2. Drag the prefab into a temporary scene. This will become your working copy in which you'll make the changes.







3. Expand the working copy. Activate the GUIRoot child GameObject. The UI should now appear in the Game view.







4. Follow the steps here to move around the UI elements.







5. Optional: If you want to change the subtitle or button text appearance, this is defined in the GUI Skin.

a. Make a copy of the Circle Dialogue UI GUI Skin. Let's say you've named it MyCircleSkin.

b. Edit MyCircleSkin in the inspector.

c. Assign MyCircleSkin to the working copy GUI Root's Gui Skin field.





6. Select your working copy. In the Inspector, click Apply to update the prefab. Then remove the working copy from the scene.







7. Assign the prefab to your Dialogue Manager's Dialogue UI field. Alternatively, you can make the working copy a child of the Dialogue Manager and assign it directly. In this case, the Dialogue System will use it instead of loading a prefab.