Help: Fixed Resolution (similar to Renpy)

Posted: 05 Jun 2021 19:53
by AntonioA

How do we keep the resolution fixed for the entire UI - including the backgrounds and text printers. I would like to see black bars on the sides for a windowed app, similar to how Renpy does it. Thus keeping all elements adjusted to the default resolution, of 1920x1080 for example.

Normally this can be achieved by setting the canvas scaler to "scale with screen size" and set it to adjust the width based on the height of the window.

Would really appreciate some help with this.


Re: Help: Fixed Resolution (similar to Renpy)

Posted: 05 Jun 2021 21:54
by Elringus

You can set supported aspect ratios, window modes and default resolution in the player settings: https://docs.unity3d.com/Manual/class-P ... Resolution


Re: Help: Fixed Resolution (similar to Renpy)

Posted: 05 Jun 2021 22:04
by AntonioA

Thanks for the reply. I'm aware of unity's player options.

I guess I was asking if there was some way to set NaniNovel to scale by window height alone and keep the aspect ratio (similar to 1920x1080).
Perhaps a default canvas that I can modify somewhere?

To clarify, my settings are fullscreen mode: windowed and resizable window. And I need the VN to maintain the aspect ratio within the window. Which isn't happening.


Re: Help: Fixed Resolution (similar to Renpy)

Posted: 05 Jun 2021 23:16
by Elringus

All the UIs (title menu, settings, etc) have their own root canvas component for which you can configure the scaling behavior.


Re: Help: Fixed Resolution (similar to Renpy)

Posted: 06 Jun 2021 06:49
by AntonioA

Thanks again. Guess we have to adjust scaling for these elements separately.

But what about VN elements like the background? Is there an easy way to make the background fit the height only. Currently it scales height and width thus filling up the entire window.


Re: Help: Fixed Resolution (similar to Renpy)

Posted: 06 Jun 2021 11:12
by Elringus

Re: Help: Fixed Resolution (similar to Renpy)

Posted: 06 Jun 2021 11:46
by AntonioA

Thanks. That works when I set the background match-mode to disabled within the specific background actor item.

However when I use a custom camera prefab in order to change the background "black bar" color the match mode changes don't work for some reason.
Would appreciate some guidance on how to change the default camera's background color; or how to get the custom camera prefab using the same match mode.


Re: Help: Fixed Resolution (similar to Renpy)

Posted: 06 Jun 2021 13:14
by Elringus

Matching should work with custom camera as well, just make sure Orthographic is enabled on the camera.


Re: Help: Fixed Resolution (similar to Renpy)

Posted: 06 Jun 2021 14:53
by AntonioA
Elringus wrote: 06 Jun 2021 13:14

Matching should work with custom camera as well, just make sure Orthographic is enabled on the camera.

I'd made sure orthographic was set. Still isn't working.

Is there any way I can set the background color of Naninovel's default camera from its current brown to black?


Re: Help: Fixed Resolution (similar to Renpy)

Posted: 06 Jun 2021 15:01
by Elringus

The only way is to use a custom camera or override camera manager service. I've just checked and matching worked for me with a custom camera. Try the latest Naninovel v1.16 (available in Discord) and make sure to use a compatible Unity version. Also, compare the default camera settings (by entering play mode without custom camera assigned and selecting the camera object on scene) with the custom camera, maybe something is off, eg ortho size.


Re: Help: Fixed Resolution (similar to Renpy)

Posted: 06 Jun 2021 15:27
by AntonioA
Elringus wrote: 06 Jun 2021 15:01

The only way is to use a custom camera or override camera manager service. I've just checked and matching worked for me with a custom camera. Try the latest Naninovel v1.16 (available in Discord) and make sure to use a compatible Unity version. Also, compare the default camera settings (by entering play mode without custom camera assigned and selecting the camera object on scene) with the custom camera, maybe something is off, eg ortho size.

Copying the settings of the default camera worked. Thanks a bunch.