diff --git a/cocos/core/scene-graph/scene-globals.ts b/cocos/core/scene-graph/scene-globals.ts index 51d4146299..147f86f985 100644 --- a/cocos/core/scene-graph/scene-globals.ts +++ b/cocos/core/scene-graph/scene-globals.ts @@ -267,11 +267,20 @@ cc.PlanarShadowInfo = PlanarShadowInfo; export class SceneGlobals { @property({ type: AmbientInfo }) public ambient = new AmbientInfo(); - @property({ type: SkyboxInfo }) - public skybox = new SkyboxInfo(); + @property + private _skybox = new SkyboxInfo(); @property({ type: PlanarShadowInfo }) public planarShadows = new PlanarShadowInfo(); + @property({ type: SkyboxInfo }) + get skybox() { + return this._skybox; + } + + set skybox(value) { + this._skybox = value; + } + set renderScene (rs: RenderScene) { this.ambient.renderScene = rs; this.skybox.renderScene = rs;