Help: Fixed Resolution (similar to Renpy)

All about user interface, be it customizing built-in UIs or adding new ones.
Post Reply
AntonioA
Posts: 12
Joined: 19 May 2021 21:39

Help: Fixed Resolution (similar to Renpy)

Post 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.

Elringus
admin
Posts: 521
Joined: 11 May 2020 18:03

Re: Help: Fixed Resolution (similar to Renpy)

Post 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

AntonioA
Posts: 12
Joined: 19 May 2021 21:39

Re: Help: Fixed Resolution (similar to Renpy)

Post 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.

Elringus
admin
Posts: 521
Joined: 11 May 2020 18:03

Re: Help: Fixed Resolution (similar to Renpy)

Post by Elringus »

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

AntonioA
Posts: 12
Joined: 19 May 2021 21:39

Re: Help: Fixed Resolution (similar to Renpy)

Post 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.

AntonioA
Posts: 12
Joined: 19 May 2021 21:39

Re: Help: Fixed Resolution (similar to Renpy)

Post 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.

Elringus
admin
Posts: 521
Joined: 11 May 2020 18:03

Re: Help: Fixed Resolution (similar to Renpy)

Post by Elringus »

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

AntonioA
Posts: 12
Joined: 19 May 2021 21:39

Re: Help: Fixed Resolution (similar to Renpy)

Post 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?

Elringus
admin
Posts: 521
Joined: 11 May 2020 18:03

Re: Help: Fixed Resolution (similar to Renpy)

Post 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.

AntonioA
Posts: 12
Joined: 19 May 2021 21:39

Re: Help: Fixed Resolution (similar to Renpy)

Post 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.

Post Reply