From e611594f595eb0f58a21546ee2caa79dd9b23767 Mon Sep 17 00:00:00 2001 From: troublemaker52025 Date: Fri, 12 May 2023 19:45:46 +0800 Subject: [PATCH] fix cl error delete skin settings jsb binding (#15047) --- cocos/scene-graph/scene-globals.jsb.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cocos/scene-graph/scene-globals.jsb.ts b/cocos/scene-graph/scene-globals.jsb.ts index f12663377d..a3ddd105ff 100644 --- a/cocos/scene-graph/scene-globals.jsb.ts +++ b/cocos/scene-graph/scene-globals.jsb.ts @@ -190,6 +190,7 @@ legacyCC.SceneGlobals = SceneGlobals; this._skyboxRef = this.getSkyboxInfo(); this._fogRef = this.getFogInfo(); this._octreeRef = this.getOctreeInfo(); + this._skinRef = this.getSkinInfo(); this._lightProbeRef = this.getLightProbeInfo(); }; @@ -265,6 +266,18 @@ legacyCC.SceneGlobals = SceneGlobals; }, }); + Object.defineProperty(sceneGlobalsProto, 'skin', { + enumerable: true, + configurable: true, + get() { + return this._skinRef; + }, + set(v) { + this._skinRef = v; + this.setSkinInfo(v); + }, + }); + Object.defineProperty(sceneGlobalsProto, 'lightProbeInfo', { enumerable: true, configurable: true, @@ -282,7 +295,7 @@ legacyCC.SceneGlobals = SceneGlobals; // handle meta data, it is generated automatically -decros.patch_cc_SceneGlobals({SceneGlobals, AmbientInfo, SkyboxInfo, FogInfo, ShadowsInfo, LightProbeInfo, OctreeInfo}); +decros.patch_cc_SceneGlobals({SceneGlobals, AmbientInfo, SkyboxInfo, FogInfo, ShadowsInfo, LightProbeInfo, OctreeInfo, SkinInfo}); decros.patch_cc_OctreeInfo({OctreeInfo, CCInteger, Vec3, DEFAULT_WORLD_MAX_POS, DEFAULT_WORLD_MIN_POS, DEFAULT_OCTREE_DEPTH});