Skip to content

Commit d3fabad

Browse files
Fix lights correctly hidden at start
1 parent ac9a7e8 commit d3fabad

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎extensions/reviewed/Light3D.json‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"name": "Light3D",
1111
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f237ae4e3b857c556846c7b2c0b132556fd4bcdeff217034b4d9c97dc1aab1d6_lightbulb-on-outline.svg",
1212
"shortDescription": "A collection of light object for 3D.",
13-
"version": "1.0.3",
13+
"version": "1.0.4",
1414
"description": "A collection of light object for 3D.",
1515
"origin": {
1616
"identifier": "Light3D",
@@ -596,7 +596,11 @@
596596
" spotLight.castShadow = false;",
597597
" spotLight.visible = false;",
598598
"",
599-
" if (!object.isHidden()) {",
599+
" // Instances hidden at start stay visible in the editor, but their light must not shine.",
600+
" const isHiddenAtStartInEditor =",
601+
" !!editor && !!editor.isInstanceHiddenAtStart && editor.isInstanceHiddenAtStart(object);",
602+
"",
603+
" if (!object.isHidden() && !isHiddenAtStartInEditor) {",
600604
" let isSelected = false;",
601605
" if (editor) {",
602606
" const selectedObject = editor._selection.getLastSelectedObject();",

0 commit comments

Comments
 (0)