bing 2 rokov pred
rodič
commit
9ec213ec88
1 zmenil súbory, kde vykonal 4 pridanie a 1 odobranie
  1. 4 1
      assets/scene/script/MainScene.ts

+ 4 - 1
assets/scene/script/MainScene.ts

@@ -1,5 +1,5 @@
 
-import { _decorator, AssetManager, assetManager, Component, find, instantiate, Label, Node, Prefab, sys, screen } from 'cc';
+import { _decorator, AssetManager, assetManager, Component, find, instantiate, Label, Node, Prefab, sys, screen, view, ResolutionPolicy } from 'cc';
 import { Config, nav_info } from './NavInfo';
 import { UtilsPanel } from './UtilsPanel';
 const { ccclass } = _decorator;
@@ -11,6 +11,9 @@ export class MainScene extends Component {
 
     protected onLoad(): void {
         // if (sys.isBrowser || sys.isMobile) screen.requestFullScreen()
+        if(!sys.isMobile){
+            view.setResolutionPolicy(ResolutionPolicy.SHOW_ALL);
+        }
         UtilsPanel.getAllNeedCom(this, find("Canvas"), true);
         nav_info.init();
         nav_info.scene = this;