Skip to content

Commit 590e3c2

Browse files
Fix lights correctly hidden at start (#2279)
1 parent 1206fbb commit 590e3c2

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.4",
13+
"version": "1.0.5",
1414
"description": "A collection of light object for 3D.",
1515
"origin": {
1616
"identifier": "Light3D",
@@ -598,7 +598,11 @@
598598
" spotLight.castShadow = false;",
599599
" spotLight.visible = false;",
600600
"",
601-
" if (!object.isHidden()) {",
601+
" // Instances hidden at start stay visible in the editor, but their light must not shine.",
602+
" const isHiddenAtStartInEditor =",
603+
" !!editor && !!editor.isInstanceHiddenAtStart && editor.isInstanceHiddenAtStart(object);",
604+
"",
605+
" if (!object.isHidden() && !isHiddenAtStartInEditor) {",
602606
" let isSelected = false;",
603607
" if (editor) {",
604608
" const selectedObject = editor._selection.getLastSelectedObject();",

0 commit comments

Comments
 (0)