Skip to content

Show runtime/script-created objects in the Scene Graph during Play #898

Description

@marquezmiguel

When clicking Play, the editor runs the scene and its scripts, but the Scene Graph (left panel) keeps showing the edit scene — not what actually exists at runtime. Objects created dynamically by scripts during Play (e.g. loading a world/level by code via AssetContainer / instantiateModelsToScene) never appear in the graph.

This happens because Play creates a separate Scene instance (new Scene(...) in the play component), while the graph is bound to editor.layout.preview.scene (the edit scene). As a result, at runtime you cannot select a script-created object to inspect its material, textures, animations or transform.

Use case

For data-driven games (e.g. an MMO client where each map/world is loaded by code from data files), almost all content is spawned at runtime, not placed by hand in the scene. Today the editor gives zero visibility into that content while playing — you can't see or inspect any of it.

What Unity does

In Unity, the Hierarchy updates live during Play: objects created by code appear, you can select them, inspect/tweak their components (material, animation, transform…) in real time, and they disappear on Stop. This is what makes the editor useful for runtime/data-driven content.

Request

During Play, bind the Scene Graph and Inspector to the play scene (this.scene) instead of the edit scene, so runtime-created objects show up and can be selected/inspected — then switch back to the edit scene on Stop. Essentially a live Hierarchy during Play, like Unity.

This would make the editor viable for data-driven / procedurally-loaded games, not only hand-authored scenes.

Metadata

Metadata

Assignees

Labels

enhancementfeatureDefines and adds a new feature to the product

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions