Skip to content

Commit

Permalink
should not clear builtins in editor (cocos#4509)
Browse files Browse the repository at this point in the history
  • Loading branch information
2youyou2 authored and pandamicro committed May 28, 2019
1 parent ed8c5b4 commit 89d2fa9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cocos2d/core/CCDirector.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,21 +349,20 @@ cc.Director.prototype = {
if (eventManager)
eventManager.setEnabled(false);

cc.renderer.clear();

if (!CC_EDITOR) {
if (cc.isValid(this._scene)) {
this._scene.destroy();
}
this._scene = null;

cc.renderer.clear();
cc.AssetLibrary.resetBuiltins();
}

this.stopAnimation();

// Clear all caches
cc.loader.releaseAll();

cc.AssetLibrary.resetBuiltins();
},

/**
Expand Down

0 comments on commit 89d2fa9

Please sign in to comment.