Skip to content

[QA] Code-generated hidden entities (VisibilityComponent) don't show in the Bevy editorΒ #1446

Description

@balducciv

πŸ› οΈ 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:

  1. Create a new scene, enable Bevy Renderer (Settings > Editor > Scene renderer)
  2. 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 })
  1. 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 })

Image Image Image

VisibilityComponent.create(cube, { visible: true })

Image Image

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status
    To Release

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions