bevy-scenes

Save and load Bevy scenes via DynamicWorld using RON serialization.

125|10|Updated Nov 22, 2022
One-click install
npx skills add https://github.com/nolantait/bevy-starter --skill bevy-scenes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bevy-scenes
Source: https://github.com/nolantait/bevy-starter/tree/main/.agents/skills/bevy-scenes
Command: npx skills add https://github.com/nolantait/bevy-starter --skill bevy-scenes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bevy developers need a reliable way to persist and restore complex scene state across sessions using reflection-based serialization, without manual wiring.

Core Features & Use Cases

  • Saving and loading scene data via DynamicWorld, WorldInstanceSpawner, and DynamicWorldRoot.
  • Support for serializable representations of resources and entities (RON format).
  • Real-world use: persisting a running game scene to disk and restoring it later for testing or level loading.

Quick Start

Use DynamicWorld to serialize the current World and store it as a scene file, then reload it with DynamicWorldRoot.

Frequently Asked Questions about bevy-scenes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save and load Bevy game scenes using reflection?

You can save and load Bevy game scenes using reflection-based serialization by serializing the current World to a RON file and restoring it with DynamicWorldRoot. This enables automatic scene persistence without manual wiring.

What is reflection-based scene serialization in Bevy?

Reflection-based scene serialization in Bevy is the process of converting entities and resources into a serializable RON format using the DynamicWorld tool. It allows complex scene state to be automatically persisted and restored across sessions.

Do I need to derive Reflect for components to use Bevy scene serialization?

Yes, components must derive Reflect to use Bevy scene serialization. You also need to use FromWorld for initialization and ensure your project is running Bevy 0.19 with DynamicWorld.

Can I persist a running Bevy game state to disk for level loading?

Yes, you can persist a running Bevy game state to disk by serializing the current World instance into a RON scene file. You can then reload it later for testing or dynamic level loading.

What are the limitations of using DynamicWorld for Bevy scene persistence?

DynamicWorld for Bevy scene persistence requires components to derive Reflect and use FromWorld for initialization. It is specifically designed for Bevy 0.19 projects and serializes data exclusively in the RON format.