fsp显示隐藏

This commit is contained in:
xu_yanfeng
2025-01-14 18:33:28 +08:00
parent f014c62f75
commit 12ddbf8ac9
3 changed files with 48 additions and 5 deletions

View File

@@ -26,6 +26,23 @@ export class Inspector extends InjectEvent {
this.updateTreeInfo();
break;
}
case Msg.VisibleFPS: {
const b = pluginEvent.data as boolean;
if (b) {
if (cc.profiler?.showStats) {
cc.profiler.showStats();
} else if (cc.debug?.setDisplayStats) {
cc.debug.setDisplayStats(true);
}
} else {
if (cc.profiler?.hideStats) {
cc.profiler.hideStats();
} else if (cc.debug?.setDisplayStats) {
cc.debug.setDisplayStats(false);
}
}
break;
}
case Msg.RequestGameInfo: {
const ret = new ResponseGameInfoData();
const atlasManager = cc?.dynamicAtlasManager || cc.internal?.dynamicAtlasManager || null;