ban runninng engine main loop in editor (#7098)

* ban runninng engine main loop in editor

* update
This commit is contained in:
PP
2020-08-16 23:05:25 +08:00
committed by GitHub
parent 9b4f0ae688
commit e68cd34dbf
+3
View File
@@ -790,6 +790,9 @@ export class Game extends EventTarget {
}
// Run game.
private _runMainLoop () {
if (EDITOR && !legacyCC.GAME_VIEW) {
return;
}
let callback: FrameRequestCallback;
const config = this.config;
const director = legacyCC.director;