The relationship between resolution and window size and UI scaling in the game

Source: Internet
Author: User

Some people often ask about this. Here we need to explain the difference:

First, the full screen and window modes are differentiated, and then the relationship between the resolution and window is differentiated. The final difference is window change or resolution change.

1. In full screen mode: The window size is not affected. All we need to do is to change the ratio of the Renderer resolution to the viewport to distinguish between the wide screen mode and the normal mode, in terms of UI scaling, you must first define the size of the basic UI. For example, if the UI of art is in x768 mode, the UI is not scaled at a resolution greater than or equal to x768, only place and crop based on the UI dock position. when the resolution is less than x768, perform proportional scaling based on the minimum aspect ratio. Pay attention to the special processing of the mouse.

2. In window mode, you must first specify whether to change the resolution of the Renderer to change the window or directly change the size of the window. When you change the resolution of the window, you must adjust the display port, the window is usually changed, and the UI scaling process is the same as that in full screen mode. However, when the window size is changed, the resolution and the size of the Renderer generally do not need to be adjusted, the UI is scaled automatically according to the window size.

 

In fact, you only need to remember that you only need to recreate the Renderer to change the resolution and the adjuset view. In the window mode, you need to change the window size. To change the window size, you only need to re-create the lost resources, in addition, the Renderer and the viewport are not adjusted (of course, this is a general method of game processing, if special needs to be added ).

Author: Wuhua wujiu Source: Sichuan ArticleThe original text connection is clearly displayed on the page. Otherwise, the legal liability is retained.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.