π οΈ Build version:
0.44.0-mac-arm64 (PR #1363, Bevy renderer branch)
π Issue Description:
Entities created via code with VisibilityComponent.create(entity, { visible: false }) do not render in the Bevy editor viewport at all β same as they wouldn't render in Preview. Per #1367 ("Hidden items are visible in the editor - dev-visibility"), the editor should still show hidden entities during authoring so they can be found/edited, only hiding them at actual runtime.
This appears to be the same underlying gap as the #1373 collider issue: dev-only editor affordances (visibility, selectability) work correctly for drag-and-drop/authored entities, but are not applied to code-generated entities in the Bevy renderer.
π£ STR:
- Create a new scene, enable Bevy Renderer (Settings > Editor > Scene renderer)
- In
src/index.ts, add:
import { engine, Transform, MeshRenderer, MeshCollider, VisibilityComponent } from '@dcl/sdk/ecs'
const cube = engine.addEntity()
Transform.create(cube, { position: { x: 8, y: 1, z: 8 } })
MeshRenderer.setBox(cube)
MeshCollider.setBox(cube)
VisibilityComponent.create(cube, { visible: false })
- Save, and look at the editor viewport (not Preview)
βοΈ Expected Result:
The entity should still render in the editor viewport (dev-visibility), while being correctly hidden once Preview/runtime starts.
β Actual Result with evidence:
The cube does not render in the editor viewport at all β identical to its (correct) behavior in Preview. For comparison, a drag-and-drop asset with its Visibility toggle set to hidden via the Inspector correctly still shows in the editor and correctly hides in Preview.
β Reproduction:
π Always - (reproduced consistently)
π₯οΈ Operative system and additional Notes:
macOS, Apple M3 Pro. Likely related root cause to the #1373 code-generated-entity collider bug β both point to dev-only editor behaviors not being applied to code-authored entities in the Bevy renderer path.
VisibilityComponent.create(cube, { visible: false })
VisibilityComponent.create(cube, { visible: true })
Platform update β confirmed reproducing on Windows too
Retested on Windows 11 using the exact STR/code from this issue, in a fresh scene (to rule out the entity-state corruption issue seen while retesting #1445).
Confirmed: VisibilityComponent.create(cube, { visible: false }) on a code-generated entity does not render in the Bevy editor viewport β same behavior as originally reported on Mac.
Conclusion: not platform-specific β reproduces on both macOS (Apple M3 Pro) and Windows 11 (Intel i7-12650H, NVIDIA RTX 4060 Laptop GPU).
π οΈ Build version:
0.44.0-mac-arm64 (PR #1363, Bevy renderer branch)
π Issue Description:
Entities created via code with
VisibilityComponent.create(entity, { visible: false })do not render in the Bevy editor viewport at all β same as they wouldn't render in Preview. Per #1367 ("Hidden items are visible in the editor - dev-visibility"), the editor should still show hidden entities during authoring so they can be found/edited, only hiding them at actual runtime.This appears to be the same underlying gap as the #1373 collider issue: dev-only editor affordances (visibility, selectability) work correctly for drag-and-drop/authored entities, but are not applied to code-generated entities in the Bevy renderer.
π£ STR:
src/index.ts, add:βοΈ Expected Result:
The entity should still render in the editor viewport (dev-visibility), while being correctly hidden once Preview/runtime starts.
β Actual Result with evidence:
The cube does not render in the editor viewport at all β identical to its (correct) behavior in Preview. For comparison, a drag-and-drop asset with its Visibility toggle set to hidden via the Inspector correctly still shows in the editor and correctly hides in Preview.
β Reproduction:
π Always - (reproduced consistently)
π₯οΈ Operative system and additional Notes:
macOS, Apple M3 Pro. Likely related root cause to the #1373 code-generated-entity collider bug β both point to dev-only editor behaviors not being applied to code-authored entities in the Bevy renderer path.
VisibilityComponent.create(cube, { visible: false })VisibilityComponent.create(cube, { visible: true })Platform update β confirmed reproducing on Windows too
Retested on Windows 11 using the exact STR/code from this issue, in a fresh scene (to rule out the entity-state corruption issue seen while retesting #1445).
Confirmed:
VisibilityComponent.create(cube, { visible: false })on a code-generated entity does not render in the Bevy editor viewport β same behavior as originally reported on Mac.Conclusion: not platform-specific β reproduces on both macOS (Apple M3 Pro) and Windows 11 (Intel i7-12650H, NVIDIA RTX 4060 Laptop GPU).