Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: rewrite scene loading example documentation for clarity and depth #17434

Merged
merged 4 commits into from
Jan 19, 2025

Conversation

Arend-Jan
Copy link
Contributor

@Arend-Jan Arend-Jan commented Jan 19, 2025

This commit overhauls the documentation in the Bevy scene loading example. It adds thorough explanatory comments to guide new Rust and Bevy developers. The rewritten docs clarify how to:

  • Register types for reflection, enabling serialization and dynamic property access
  • Skip serializing certain fields with #[reflect(skip_serializing)]
  • Use FromWorld for components that require runtime initialization
  • Store and serialize Resources in scene files
  • Load scenes using a DynamicSceneRoot and handle updates in a system
  • Serialize a brand-new scene to a separate file asynchronously using IoTaskPool

These additions aim to provide a clear, step-by-step reference that demonstrates how to implement a scene-based workflow, making it easier for beginners and experienced developers alike to use Bevy’s scene system effectively.

This commit overhauls the documentation in the Bevy scene loading example. It adds 
thorough explanatory comments to guide new Rust and Bevy 
developers. The rewritten docs clarify how to:

- Register types for reflection, enabling serialization and dynamic property access
- Skip serializing certain fields with `#[reflect(skip_serializing)]`
- Use `FromWorld` for components that require runtime initialization
- Store and serialize `Resources` in scene files
- Load scenes using a `DynamicSceneRoot` and handle updates in a system
- Serialize a brand-new scene to a separate file asynchronously using `IoTaskPool`

These additions aim to provide a clear, step-by-step reference that demonstrates 
how to implement a scene-based workflow, making it easier for beginners and 
experienced developers alike to use Bevy’s scene system effectively.
Copy link
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

Copy link
Contributor

@Carter0 Carter0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@alice-i-cecile alice-i-cecile added C-Examples An addition or correction to our examples A-Scenes Serialized ECS data stored on the disk S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 19, 2025
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really nice: this example has long been neglected, and the clear, detailed explanations that you've added here are incredibly helpful. Thanks for doing this!

I've cleaned up a couple of things (extra template text in your PR description, the initial headers), but I'm going to merge this now.

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 19, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 19, 2025
Merged via the queue into bevyengine:main with commit 9c5f5b8 Jan 19, 2025
29 checks passed
@Arend-Jan Arend-Jan deleted the patch-1 branch January 19, 2025 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Scenes Serialized ECS data stored on the disk C-Examples An addition or correction to our examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants