Skip to content

Commit 760cf4b

Browse files
authored
[Fix] Removed duplicate destructor in the scene (playcanvas#2888)
1 parent 7bdb898 commit 760cf4b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/scene/scene.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ class Scene extends EventHandler {
160160
}
161161

162162
destroy() {
163+
this._resetSkyboxModel();
163164
this.root = null;
164165
this.defaultMaterial.destroy();
165166
this.defaultMaterial = null;
@@ -503,10 +504,6 @@ class Scene extends EventHandler {
503504
this.skybox = cubemaps[0];
504505
}
505506

506-
destroy = function () {
507-
this.skybox = null;
508-
}
509-
510507
// Backwards compatibility
511508
addModel(model) {
512509
if (this.containsModel(model)) return;

0 commit comments

Comments
 (0)