Page 1 of 1
WebGL Dialogue scale problem
Posted: Mon Dec 28, 2020 11:44 am
by DryreL
Hello,
I exported the game for the WebGL test. The game works fine in fullscreen mode (1920x1080), however 960x480 WebGL mode makes the dialogues in vertical line, too small, it's thinned out in the middle of the screen. How can I solve this? Thank you.
Re: WebGL Dialogue scale problem
Posted: Mon Dec 28, 2020 3:09 pm
by Tony Li
Hi,
This isn't specific to the Dialogue System. Here are two ways to handle UI scaling:
1. Add a Canvas Scaler component. Set it to Scale With Screen Size, and set a reference resolution such as 1920x1080. In a 960x480 WebGL window, Unity will scale the UI to half size so everything looks proportionally the same as 1920x1080 screen.
2. Or set the UI elements' anchors so they'll move around relative to the edges of the screen.
More info:
Designing UI for Multiple Resolutions
Re: WebGL Dialogue scale problem
Posted: Tue Dec 29, 2020 1:19 am
by DryreL
Oh, I thought it was already have it... Ok, thanks.
Another more thing, I'm edited Focus template a bit and one thing left to done. By default, both speaker names are always written there (both names are visible). I just want the name of the one speaker who speak to be written/visible. How can I do that?
Re: WebGL Dialogue scale problem
Posted: Tue Dec 29, 2020 9:16 am
by Tony Li
Hi,
You can configure the OnFocus() and OnUnfocus() methods to show and hide the names, or you can control them in your focus and unfocus animations.