Selaa lähdekoodia

Don't show skeleton viewer if isEnabled=false (#8406)

* Fix crash when loading vertex colors from a .obj file

* Don't show the skeleton viewer if isEnabled=false
Popov72 5 vuotta sitten
vanhempi
commit
36536d5764
2 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 1 0
      dist/preview release/what's new.md
  2. 4 0
      src/Debug/skeletonViewer.ts

+ 1 - 0
dist/preview release/what's new.md

@@ -233,6 +233,7 @@
 - Fixed `AssetContainer.instantiateModelsToScene` with cloneMaterials=true and MultiMaterials to properly set the cloned submaterials ([ghempton](https://github.com/ghempton))
 - Fixed `AssetContainer.instantiateModelsToScene` with cloneMaterials=true and MultiMaterials to properly set the cloned submaterials ([ghempton](https://github.com/ghempton))
 - Fixed wrong display when setting `DefaultRenderingPipeline.imageProcessingEnabled` to `false` ([Popov72](https://github.com/Popov72))
 - Fixed wrong display when setting `DefaultRenderingPipeline.imageProcessingEnabled` to `false` ([Popov72](https://github.com/Popov72))
 - Fix crash when loading a .obj file with vertex colors ([Popov72](https://github.com/Popov72))
 - Fix crash when loading a .obj file with vertex colors ([Popov72](https://github.com/Popov72))
+- Fix skeleton viewer still visible when `isEnabled = false` ([Popov72](https://github.com/Popov72))
 
 
 ## Breaking changes
 ## Breaking changes
 
 

+ 4 - 0
src/Debug/skeletonViewer.ts

@@ -70,6 +70,10 @@ export class SkeletonViewer {
 
 
         this._isEnabled = value;
         this._isEnabled = value;
 
 
+        if (this._debugMesh) {
+            this._debugMesh.setEnabled(value);
+        }
+
         if (value) {
         if (value) {
             this._scene.registerBeforeRender(this._renderFunction);
             this._scene.registerBeforeRender(this._renderFunction);
         } else {
         } else {