# Bevy Asset Scenes

Load Bevy 0.20 assets with AssetServer and spawn scenes with bsn!, spawn_scene, and...

- Repository: https://github.com/thedivergentai/Game-Dev-Agentic-Skills (917 stars)
- Category: Engineering
- License: LGPL-3.0
- Last updated: 2026-10-16
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-asset-scenes -g -a claude-code -y`
Codex: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-asset-scenes -g -a codex -y`
Cursor: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-asset-scenes -g -a cursor -y`
Gemini CLI: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-asset-scenes -g -a gemini-cli -y`

## Description

Load Bevy 0.20 assets with AssetServer and spawn scenes with bsn!, spawn_scene, and queue_spawn_scene. Use when content comes from disk, a handle must be ready, or a level root should be replaced. Keywords: AssetServer, Handle, is_loaded_with_dependencies, bsn, Scene, file_watcher, LevelRoot.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Bevy asset scenes

## When to use

Load this when content comes from disk or a scene description should spawn entities. `AssetServer` loads files. `bsn!` describes a `Scene` that `spawn_scene` or `queue_spawn_scene` turns into entities.

## ECS shape

- **Assets:** `AssetServer` is the resource that loads from disk. `AssetServer::load` returns a `Handle` and does not reload while a strong handle still exists. Loaded data lives in `Assets<T>`. `AssetServer::is_loaded_with_dependencies` is true when the asset and its dependencies are ready. `LoadState` is the status type named on that page.
- **Handles:** strong handles are reference counted. Dropping the last strong handle removes the asset. Weak handles do not keep it alive. `Assets::add` inserts a procedural asset and does not deduplicate.
- **Hot reload:** the `file_watcher` Cargo feature, and `AssetPlugin`'s `watch_for_changes_override` field, are the toggles named on the asset index.
- **Scenes:** `bevy::scene` describes a `Scene` (entity, components, children, assets), built with the `bsn!` macro. `World::spawn_scene` and `Commands::spawn_scene` spawn immediately and error if asset dependencies are not loaded. `World::queue_spawn_scene` and `Commands::queue_spawn_scene` wait, then spawn in the `SpawnScene` schedule between `Update` and `PostUpdate`.
- **Hierarchy in a scene:** `Children [ ... ]` inside `bsn!`. Separate sibling entities with `--`. `#Name` assigns a `Name` inside that macro's scope.

## Asset choice

| Need | Do this |
| --- | --- |
| Load a file | `AssetServer::load` returns a `Handle` |
| Wait until ready | `is_loaded_with_dependencies` before a state change |
| Spawn a scene now | `spawn_scene` only after dependencies are loaded |
| Spawn when ready | `queue_spawn_scene` (`SpawnScene` sits between `Update` and `PostUpdate`) |
| Children in that scene | `Children` inside `bsn!` |
| Change one entity's mesh | Swap the `Handle` on the component that stores it |

The rest: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/blob/HEAD/skills/bevy-asset-scenes/SKILL.md
