Client Scene Presentation And Player Preview
The player-preview pipeline is the shared presentation layer for editor play, local playtest, standalone runtime, remote avatars, local control, combat cues, NPCs, mobs, camera behavior, post-process, placed lights, and scene overlays. It is broader than the paperdoll preview tools; it is how client-visible scene actors become Bevy entities.
How It Works
The plugin installs presentation systems, pipeline configs, render controllers, keyed entity registries, visual caches, action cues, actor visuals, and scene cleanup behavior. Editor play and runtime modes feed different data sources into the same presentation pipeline so local preview, standalone, and multiplayer can reuse actor rendering behavior.
How To Use It
Add new visible actor behavior through the presentation pipeline, not by spawning unrelated entities from gameplay code. Define keyed entity ownership, cache invalidation, layer visibility, scene-change cleanup, and debug overlays together. When an effect is tied to combat or gameplay authority, keep the cue id and authoritative event path stable.
Invariants
Keyed entities must be unique and cleaned up when their source actor or scene disappears. Presentation caches must invalidate when assets, visual specs, or actor state change. Layer visibility and camera behavior must respect editor/runtime mode. Runtime presentation should not become the source of gameplay authority.
Debugging
Use debug overlays and runtime profile spans to inspect actor visibility, keyed entity ownership, and scene cleanup. If remote players leave ghost visuals, check keyed entity cleanup. If action cues do not play, confirm the authoritative event, cue id, and presentation cache. If standalone differs from editor preview, compare pipeline config and packed assets.
Examples
To add a combat action cue, define the cue from authoritative combat output, add presentation handling in the action-cue renderer, and verify cleanup when the actor despawns. To add a new NPC visual, route the scene NPC state through the keyed entity registry and reuse existing layer and cache behavior.