Commit 2e3f8457 authored by limingzhe's avatar limingzhe

fix: 转屏调试

parent e6b0b2a0
......@@ -8,6 +8,8 @@ export abstract class middleLayerBase extends cc.Component {
abstract hideWaitingLetters(): void;
abstract showWaitingLetters(): void;
private oldSceneName = null;
onMiddleLayerLoadingFinish() {
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {
jsb.reflection.callStaticMethod(
......@@ -133,10 +135,10 @@ export abstract class middleLayerBase extends cc.Component {
this.showMask();
this.showWaitingLetters();
const oldSceneName = this.currentBundleInfo?.sceneName;
const oldSceneName = this.oldSceneName; //this.currentBundleInfo?.sceneName;
const engineInfo = await this.getEngineInfo();
const { isChanged } = JSON.parse(engineInfo);
if (isChanged || true) {
if (oldSceneName && (isChanged || true)) {
await this.checkRotateScreen(oldSceneName, sceneName);
}
......@@ -154,6 +156,8 @@ export abstract class middleLayerBase extends cc.Component {
canvas.getComponent(cc.Widget).updateAlignment();
middleLayer.scale = canvas.width / middleLayer.width;
callback && callback();
this.oldSceneName = sceneName
});
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment