diff --git a/src/framework/lightmapper/bake-light.js b/src/framework/lightmapper/bake-light.js index c4f450d5881..4ce0891d381 100644 --- a/src/framework/lightmapper/bake-light.js +++ b/src/framework/lightmapper/bake-light.js @@ -45,7 +45,7 @@ class BakeLight { this.intensity = this.light.intensity; this.rotation = this.light._node.getLocalRotation().clone(); this.numCascades = this.light.numCascades; - this.castShadows = this.light.castShadows; + this.castShadows = this.light._castShadows; } restore() { @@ -56,7 +56,7 @@ class BakeLight { light.intensity = this.intensity; light._node.setLocalRotation(this.rotation); light.numCascades = this.numCascades; - light.castShadows = this.castShadows; + light._castShadows = this.castShadows; } startBake() {