Home > other >  Unity after packaging set a full-screen window on both sides of the black edge
Unity after packaging set a full-screen window on both sides of the black edge

Time:09-27

 is shown in figure, this is my Canvas when setting I use is ugui making made to 1920 * 1080, also set the adaptive, packaged with script Settings after released full screen in addition to 1920 * 1080 is normal, the rest of the Settings window will appear on both sides of black side of the situation, this is what reason, how to change

CodePudding user response:

Adaptive didn't work, you have a good look at it

CodePudding user response:

You this is adaptive maintain unchanged, with scaling width

CodePudding user response:

Pulling anchor every UI elements to fit the size of the UI

CodePudding user response:

Should be adapted is high

CodePudding user response:

Weight configuration, try to 0.5

CodePudding user response:

Using System. The Collections;
using System.Collections.Generic;
Using UnityEngine;

Public class FullScreen: MonoBehaviour {
Private void Awake ()
{
//access to set the current screen resolution
Resolution [] resolutions=Screen. Resolutions;
//set the current resolution
Screen. SetResolution (resolutions [resolutions. The Length - 1]. Width, resolutions [resolutions. The Length - 1]. Height, true);

Screen. The fullScreen=true;//set to full screen

}
}
This script put objects

CodePudding user response:

Recently met, don't know and you are consistent, I'm doing a Windows Screen program, desktop set 3840 * 1920 resolution, but the procedure to obtain Screen. The resolutions, Screen. CurrentResolution chose a 1080 * 1920, because the factory make machines have a display controller set wrong, because do not understand the hardware principle, thus set up with the following code:
Int screenWidth=GetSystemMetrics (SM_CXSCREEN);
Int screenHeight=GetSystemMetrics (SM_CYSCREEN);
Screen. SetResolution (screenWidth screenHeight, true);

CodePudding user response:

You are packaged sets the size of the screen, but also is the different display hardware will not be the same: android, ios mobile phones, ios tablet, and to be able to touch screen computer,
  • Related