bevy-asset-scenes

Installation
SKILL.md
Contains Shell Commands

This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.

Bevy asset scenes

When to use

Load this when content comes from disk or a scene description should spawn entities. bevy::asset and bevy::scene on docs.rs latest (0.20.0) are the sources.

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.

Coming from Godot

Installs
4
GitHub Stars
850
First Seen
3 days ago